diff --git a/Cargo.lock b/Cargo.lock index a6c8dafb1..dcfbe4341 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -275,18 +275,17 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -295,7 +294,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -303,17 +302,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -657,7 +659,7 @@ version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.72", @@ -1183,7 +1185,7 @@ checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" dependencies = [ "darling", "either", - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.72", @@ -2152,12 +2154,6 @@ dependencies = [ "http 0.2.12", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -2419,14 +2415,15 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 0.14.30", + "hyper 1.4.1", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] @@ -2658,6 +2655,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" @@ -3497,9 +3503,9 @@ checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pbjson" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" +checksum = "c7e6349fa080353f4a597daffd05cb81572a9c031a6d4fff7e504947496fcc68" dependencies = [ "base64 0.21.7", "serde", @@ -3507,21 +3513,21 @@ dependencies = [ [[package]] name = "pbjson-build" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +checksum = "6eea3058763d6e656105d1403cb04e0a41b7bbac6362d413e7c33be0c32279c9" dependencies = [ - "heck 0.4.1", - "itertools 0.11.0", + "heck", + "itertools 0.13.0", "prost", "prost-types", ] [[package]] name = "pbjson-types" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" +checksum = "e54e5e7bfb1652f95bc361d76f3c780d8e526b134b85417e774166ee941f0887" dependencies = [ "bytes", "chrono", @@ -3880,9 +3886,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" dependencies = [ "bytes", "prost-derive", @@ -3890,12 +3896,12 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" dependencies = [ "bytes", - "heck 0.5.0", + "heck", "itertools 0.12.1", "log", "multimap", @@ -3911,9 +3917,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" dependencies = [ "anyhow", "itertools 0.12.1", @@ -3924,9 +3930,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" dependencies = [ "prost", ] @@ -4332,27 +4338,15 @@ dependencies = [ "sct", ] -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-pki-types", - "rustls-webpki 0.102.6", - "subtle", - "zeroize", -] - [[package]] name = "rustls" version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ + "log", "once_cell", + "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.6", "subtle", @@ -4361,9 +4355,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile 2.1.3", @@ -4880,7 +4874,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -5228,16 +5222,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -5269,17 +5253,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.0" @@ -5390,28 +5363,30 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", "rustls-pemfile 2.1.3", - "rustls-pki-types", + "socket2", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tokio-stream", "tower", "tower-layer", diff --git a/Cargo.toml b/Cargo.toml index b51500397..cefde727d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,10 +41,10 @@ openmls = { git = "https://github.com/xmtp/openmls", rev = "87e7e257d8eb15d6662b openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "87e7e257d8eb15d6662b104518becfc75ef6db76" } openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "87e7e257d8eb15d6662b104518becfc75ef6db76" } openmls_traits = { git = "https://github.com/xmtp/openmls", rev = "87e7e257d8eb15d6662b104518becfc75ef6db76" } -pbjson = "0.6.0" -pbjson-types = "0.6.0" -prost = "^0.12" -prost-types = "^0.12" +pbjson = "0.7.0" +pbjson-types = "0.7.0" +prost = "^0.13" +prost-types = "^0.13" rand = "0.8.5" regex = "1.10.4" rustc-hex = "2.1.0" @@ -54,7 +54,7 @@ sha2 = "0.10.8" thiserror = "1.0" tls_codec = "0.4.1" tokio = { version = "1.35.1", default-features = false } -tonic = "^0.11" +tonic = "^0.12" tracing = { version = "0.1" } tracing-subscriber = "0.3" url = "2.5.0" diff --git a/bindings_ffi/Cargo.lock b/bindings_ffi/Cargo.lock index 2881cdbfb..5a3700f04 100644 --- a/bindings_ffi/Cargo.lock +++ b/bindings_ffi/Cargo.lock @@ -288,18 +288,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.11", - "http-body 0.4.6", - "hyper 0.14.28", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "itoa", "matchit", "memchr", @@ -308,7 +307,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -316,17 +315,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.11", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -2191,6 +2193,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -2214,14 +2217,15 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 0.14.28", + "hyper 1.3.1", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] @@ -2416,6 +2420,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.10" @@ -3098,9 +3111,9 @@ checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pbjson" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" +checksum = "c7e6349fa080353f4a597daffd05cb81572a9c031a6d4fff7e504947496fcc68" dependencies = [ "base64 0.21.7", "serde", @@ -3108,21 +3121,21 @@ dependencies = [ [[package]] name = "pbjson-build" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +checksum = "6eea3058763d6e656105d1403cb04e0a41b7bbac6362d413e7c33be0c32279c9" dependencies = [ - "heck 0.4.1", - "itertools 0.11.0", + "heck 0.5.0", + "itertools 0.13.0", "prost", "prost-types", ] [[package]] name = "pbjson-types" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" +checksum = "e54e5e7bfb1652f95bc361d76f3c780d8e526b134b85417e774166ee941f0887" dependencies = [ "bytes", "chrono", @@ -3473,9 +3486,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" dependencies = [ "bytes", "prost-derive", @@ -3483,9 +3496,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" dependencies = [ "bytes", "heck 0.5.0", @@ -3504,9 +3517,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" dependencies = [ "anyhow", "itertools 0.11.0", @@ -3517,9 +3530,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" dependencies = [ "prost", ] @@ -3749,7 +3762,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", @@ -3931,11 +3944,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" dependencies = [ "log", + "once_cell", "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.2", @@ -3945,9 +3959,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile 2.1.0", @@ -4525,6 +4539,12 @@ 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" + [[package]] name = "system-configuration" version = "0.5.1" @@ -4722,16 +4742,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.2.0" @@ -4765,11 +4775,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.22.4", + "rustls 0.23.7", "rustls-pki-types", "tokio", ] @@ -4895,28 +4905,30 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2 0.3.24", - "http 0.2.11", - "http-body 0.4.6", - "hyper 0.14.28", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", "rustls-pemfile 2.1.0", - "rustls-pki-types", + "socket2", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tokio-stream", "tower", "tower-layer", diff --git a/bindings_ffi/Cargo.toml b/bindings_ffi/Cargo.toml index d4a1c31c1..4685dcb6f 100644 --- a/bindings_ffi/Cargo.toml +++ b/bindings_ffi/Cargo.toml @@ -19,8 +19,8 @@ uniffi_macros = "0.28.0" xmtp_api_grpc = { path = "../xmtp_api_grpc" } xmtp_cryptography = { path = "../xmtp_cryptography" } xmtp_id = { path = "../xmtp_id" } -xmtp_mls = { path = "../xmtp_mls", features = ["grpc", "native"] } -xmtp_proto = { path = "../xmtp_proto", features = ["proto_full", "grpc"] } +xmtp_mls = { path = "../xmtp_mls", features = ["native"] } +xmtp_proto = { path = "../xmtp_proto", features = ["proto_full"] } xmtp_user_preferences = { path = "../xmtp_user_preferences" } xmtp_v2 = { path = "../xmtp_v2" } diff --git a/bindings_node/Cargo.lock b/bindings_node/Cargo.lock index fb9c6a61e..e5c2040a8 100644 --- a/bindings_node/Cargo.lock +++ b/bindings_node/Cargo.lock @@ -185,18 +185,17 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "itoa", "matchit", "memchr", @@ -205,7 +204,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", + "sync_wrapper 1.0.1", "tower", "tower-layer", "tower-service", @@ -213,17 +212,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", ] @@ -2005,6 +2007,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -2028,14 +2031,15 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 0.14.28", + "hyper 1.3.1", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] @@ -2228,6 +2232,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" @@ -2920,9 +2933,9 @@ checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pbjson" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" +checksum = "c7e6349fa080353f4a597daffd05cb81572a9c031a6d4fff7e504947496fcc68" dependencies = [ "base64 0.21.7", "serde", @@ -2930,21 +2943,21 @@ dependencies = [ [[package]] name = "pbjson-build" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +checksum = "6eea3058763d6e656105d1403cb04e0a41b7bbac6362d413e7c33be0c32279c9" dependencies = [ - "heck 0.4.1", - "itertools 0.11.0", + "heck 0.5.0", + "itertools 0.13.0", "prost", "prost-types", ] [[package]] name = "pbjson-types" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" +checksum = "e54e5e7bfb1652f95bc361d76f3c780d8e526b134b85417e774166ee941f0887" dependencies = [ "bytes", "chrono", @@ -3246,9 +3259,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" dependencies = [ "bytes", "prost-derive", @@ -3256,9 +3269,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" dependencies = [ "bytes", "heck 0.5.0", @@ -3277,9 +3290,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" dependencies = [ "anyhow", "itertools 0.12.1", @@ -3290,9 +3303,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" dependencies = [ "prost", ] @@ -3459,7 +3472,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-rustls 0.24.1", @@ -3502,7 +3515,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", @@ -3684,23 +3697,24 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "log", + "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.7", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile 2.1.2", @@ -3746,9 +3760,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -4228,6 +4242,12 @@ 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" + [[package]] name = "system-configuration" version = "0.5.1" @@ -4393,16 +4413,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.2.0" @@ -4436,11 +4446,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.22.4", + "rustls 0.23.12", "rustls-pki-types", "tokio", ] @@ -4532,28 +4542,30 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", "rustls-pemfile 2.1.2", - "rustls-pki-types", + "socket2", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tokio-stream", "tower", "tower-layer", diff --git a/bindings_node/Cargo.toml b/bindings_node/Cargo.toml index 23711717c..9d10429ad 100644 --- a/bindings_node/Cargo.toml +++ b/bindings_node/Cargo.toml @@ -17,14 +17,14 @@ napi = { version = "2.12.2", default-features = false, features = [ "async", ] } napi-derive = "2.12.2" -prost = "^0.12" +prost = "^0.13" rand = "0.8.5" tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread", "time"] } -tonic = { version = "^0.11", features = ["tls"] } +tonic = { version = "^0.12", features = ["tls"] } xmtp_api_grpc = { path = "../xmtp_api_grpc" } xmtp_cryptography = { path = "../xmtp_cryptography" } xmtp_id = { path = "../xmtp_id" } -xmtp_mls = { path = "../xmtp_mls", features = ["grpc", "native"] } +xmtp_mls = { path = "../xmtp_mls", features = ["native"] } xmtp_proto = { path = "../xmtp_proto", features = ["proto_full"] } [build-dependencies] diff --git a/examples/cli/Cargo.toml b/examples/cli/Cargo.toml index 3d3674e37..861e168a0 100644 --- a/examples/cli/Cargo.toml +++ b/examples/cli/Cargo.toml @@ -36,5 +36,5 @@ url = "2.3.1" xmtp_api_grpc = { path = "../../xmtp_api_grpc" } xmtp_cryptography = { path = "../../xmtp_cryptography" } xmtp_id = { path = "../../xmtp_id" } -xmtp_mls = { path = "../../xmtp_mls", features = ["grpc", "native"] } -xmtp_proto = { path = "../../xmtp_proto", features = ["proto_full", "grpc"] } +xmtp_mls = { path = "../../xmtp_mls", features = ["native"] } +xmtp_proto = { path = "../../xmtp_proto", features = ["proto_full"] } diff --git a/mls_validation_service/Cargo.toml b/mls_validation_service/Cargo.toml index 034702610..6da9cbdb5 100644 --- a/mls_validation_service/Cargo.toml +++ b/mls_validation_service/Cargo.toml @@ -27,8 +27,6 @@ xmtp_id.workspace = true xmtp_mls.workspace = true xmtp_proto = { path = "../xmtp_proto", features = [ "proto_full", - "grpc", - "tonic", "convert", ] } diff --git a/xmtp_api_grpc/Cargo.toml b/xmtp_api_grpc/Cargo.toml index 1271b2833..d96a19b1d 100644 --- a/xmtp_api_grpc/Cargo.toml +++ b/xmtp_api_grpc/Cargo.toml @@ -16,11 +16,11 @@ serde = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] } tonic = { workspace = true, features = [ "tls", - "tls-roots", + "tls-native-roots", "tls-webpki-roots", ] } tracing.workspace = true -xmtp_proto = { path = "../xmtp_proto", features = ["proto_full", "grpc"] } +xmtp_proto = { path = "../xmtp_proto", features = ["proto_full"] } xmtp_v2 = { path = "../xmtp_v2" } [dev-dependencies] diff --git a/xmtp_api_grpc/src/grpc_api_helper.rs b/xmtp_api_grpc/src/grpc_api_helper.rs index 06683fa62..7f9235405 100644 --- a/xmtp_api_grpc/src/grpc_api_helper.rs +++ b/xmtp_api_grpc/src/grpc_api_helper.rs @@ -56,7 +56,7 @@ async fn create_tls_channel(address: String) -> Result { // Functionality: If a ping response is not received within this duration, the connection is presumed to be lost and is closed. // Impact: This setting is crucial for quickly detecting unresponsive connections and freeing up resources associated with them. It ensures that the client has up-to-date information on the status of connections and can react accordingly. .keep_alive_timeout(Duration::from_secs(25)) - .tls_config(ClientTlsConfig::new()) + .tls_config(ClientTlsConfig::new().with_enabled_roots()) .map_err(|e| Error::new(ErrorKind::SetupTLSConfigError).with(e))? .connect() .await diff --git a/xmtp_mls/Cargo.toml b/xmtp_mls/Cargo.toml index daf7554fc..c992137ba 100644 --- a/xmtp_mls/Cargo.toml +++ b/xmtp_mls/Cargo.toml @@ -19,7 +19,6 @@ bench = [ "xmtp_api_grpc", ] default = ["native"] -grpc = ["xmtp_proto/grpc"] http-api = ["xmtp_api_http"] native = ["libsqlite3-sys/bundled-sqlcipher-vendored-openssl"] test-utils = [] diff --git a/xmtp_mls/src/api/mls.rs b/xmtp_mls/src/api/mls.rs index e12dd9574..7ac073f26 100644 --- a/xmtp_mls/src/api/mls.rs +++ b/xmtp_mls/src/api/mls.rs @@ -424,7 +424,7 @@ pub mod tests { // Set expectation for first request with no cursor mock_api .expect_query_group_messages() - .withf(move |req| match req.paging_info.clone() { + .withf(move |req| match req.paging_info { Some(paging_info) => paging_info.id_cursor == 0, None => true, }) @@ -443,7 +443,7 @@ pub mod tests { // Set expectation for requests with a cursor mock_api .expect_query_group_messages() - .withf(|req| match req.paging_info.clone() { + .withf(|req| match req.paging_info { Some(paging_info) => paging_info.id_cursor > 0, None => false, }) diff --git a/xmtp_proto/Cargo.toml b/xmtp_proto/Cargo.toml index f919ef79a..b231be0f7 100644 --- a/xmtp_proto/Cargo.toml +++ b/xmtp_proto/Cargo.toml @@ -11,16 +11,19 @@ pbjson-types.workspace = true pbjson.workspace = true prost = { workspace = true, features = ["prost-derive"] } # Only necessary if using Protobuf well-known types: -openmls = { workspace = true, optional = true } -openmls_basic_credential = { workspace = true, optional = true } prost-types = { workspace = true } serde = { workspace = true } -tonic = { workspace = true, optional = true } +openmls_basic_credential = { workspace = true, optional = true } +openmls = { workspace = true, optional = true } + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +tonic = { workspace = true } + [features] convert = ["openmls_basic_credential", "openmls", "proto_full"] default = [] -grpc = ["tonic"] + # @@protoc_deletion_point(features) # This section is automatically generated by protoc-gen-prost-crate. # Changes in this area may be lost on regeneration. diff --git a/xmtp_proto/buf.gen.yaml b/xmtp_proto/buf.gen.yaml index aa5ea1dae..4ca89dd90 100644 --- a/xmtp_proto/buf.gen.yaml +++ b/xmtp_proto/buf.gen.yaml @@ -2,29 +2,31 @@ version: v1 managed: enabled: true plugins: - - plugin: buf.build/community/neoeinstein-prost:v0.3.1 + - plugin: buf.build/community/neoeinstein-prost:v0.4.0 out: src/gen opt: - compile_well_known_types - extern_path=.google.protobuf=::pbjson_types - file_descriptor_set - - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0 + - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.1 out: src/gen - - plugin: buf.build/community/neoeinstein-tonic:v0.4.0 + - plugin: buf.build/community/neoeinstein-tonic:v0.4.1 out: src/gen opt: - no_server=false - compile_well_known_types - extern_path=.google.protobuf=::pbjson_types # Exclude it from non-tonic builds (so we can use the rest in Wasm) - - client_mod_attribute=xmtp.identity.api.v1=#[cfg(feature = "tonic")] - - client_mod_attribute=xmtp.message_api.v1=#[cfg(feature = "tonic")] - - client_mod_attribute=xmtp.mls.api.v1=#[cfg(feature = "tonic")] - - client_mod_attribute=xmtp.mls_validation.v1=#[cfg(feature = "tonic")] - - server_mod_attribute=xmtp.identity.api.v1=#[cfg(feature = "tonic")] - - server_mod_attribute=xmtp.mls_validation.v1=#[cfg(feature = "tonic")] - - server_mod_attribute=xmtp.message_api.v1=#[cfg(feature = "tonic")] - - server_mod_attribute=xmtp.mls.api.v1=#[cfg(feature = "tonic")] + - client_mod_attribute=xmtp.identity.api.v1=#[cfg(not(target_arch = "wasm32"))] + - client_mod_attribute=xmtp.message_api.v1=#[cfg(not(target_arch = "wasm32"))] + - client_mod_attribute=xmtp.mls.api.v1=#[cfg(not(target_arch = "wasm32"))] + - client_mod_attribute=xmtp.mls_validation.v1=#[cfg(not(target_arch = "wasm32"))] + - client_mod_attribute=xmtp.xmtpv4=#[cfg(not(target_arch = "wasm32"))] + - server_mod_attribute=xmtp.identity.api.v1=#[cfg(not(target_arch = "wasm32"))] + - server_mod_attribute=xmtp.mls_validation.v1=#[cfg(not(target_arch = "wasm32"))] + - server_mod_attribute=xmtp.message_api.v1=#[cfg(not(target_arch = "wasm32"))] + - server_mod_attribute=xmtp.mls.api.v1=#[cfg(not(target_arch = "wasm32"))] + - server_mod_attribute=xmtp.xmtpv4=#[cfg(not(target_arch = "wasm32"))] - name: prost-crate out: . strategy: all diff --git a/xmtp_proto/src/gen/xmtp.identity.api.v1.rs b/xmtp_proto/src/gen/xmtp.identity.api.v1.rs index 5079157b9..0b77836b7 100644 --- a/xmtp_proto/src/gen/xmtp.identity.api.v1.rs +++ b/xmtp_proto/src/gen/xmtp.identity.api.v1.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Publishes an identity update to the network #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -8,7 +9,7 @@ pub struct PublishIdentityUpdateRequest { } /// The response when an identity update is published #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PublishIdentityUpdateResponse { } /// Get all updates for an identity since the specified time diff --git a/xmtp_proto/src/gen/xmtp.identity.api.v1.serde.rs b/xmtp_proto/src/gen/xmtp.identity.api.v1.serde.rs index 029e46b6a..ed2e88547 100644 --- a/xmtp_proto/src/gen/xmtp.identity.api.v1.serde.rs +++ b/xmtp_proto/src/gen/xmtp.identity.api.v1.serde.rs @@ -110,6 +110,7 @@ impl serde::Serialize for get_identity_updates_request::Request { } if self.sequence_id != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("sequenceId", ToString::to_string(&self.sequence_id).as_str())?; } struct_ser.end() @@ -314,10 +315,12 @@ impl serde::Serialize for get_identity_updates_response::IdentityUpdateLog { let mut struct_ser = serializer.serialize_struct("xmtp.identity.api.v1.GetIdentityUpdatesResponse.IdentityUpdateLog", len)?; if self.sequence_id != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("sequenceId", ToString::to_string(&self.sequence_id).as_str())?; } if self.server_timestamp_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("serverTimestampNs", ToString::to_string(&self.server_timestamp_ns).as_str())?; } if let Some(v) = self.update.as_ref() { diff --git a/xmtp_proto/src/gen/xmtp.identity.api.v1.tonic.rs b/xmtp_proto/src/gen/xmtp.identity.api.v1.tonic.rs index 90f53d301..52a54f8e5 100644 --- a/xmtp_proto/src/gen/xmtp.identity.api.v1.tonic.rs +++ b/xmtp_proto/src/gen/xmtp.identity.api.v1.tonic.rs @@ -1,6 +1,6 @@ // @generated /// Generated client implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod identity_api_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -175,7 +175,7 @@ pub mod identity_api_client { } } /// Generated server implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod identity_api_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -206,19 +206,17 @@ pub mod identity_api_server { } #[derive(Debug)] pub struct IdentityApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl IdentityApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -281,7 +279,6 @@ pub mod identity_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/xmtp.identity.api.v1.IdentityApi/PublishIdentityUpdate" => { #[allow(non_camel_case_types)] @@ -313,7 +310,6 @@ pub mod identity_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = PublishIdentityUpdateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -360,7 +356,6 @@ pub mod identity_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = GetIdentityUpdatesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -406,7 +401,6 @@ pub mod identity_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = GetInboxIdsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -428,8 +422,11 @@ pub mod identity_api_server { Ok( http::Response::builder() .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) .body(empty_body()) .unwrap(), ) @@ -450,16 +447,6 @@ pub mod identity_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for IdentityApiServer { const NAME: &'static str = "xmtp.identity.api.v1.IdentityApi"; } diff --git a/xmtp_proto/src/gen/xmtp.identity.associations.rs b/xmtp_proto/src/gen/xmtp.identity.associations.rs index beb97ec02..8ec6b99a5 100644 --- a/xmtp_proto/src/gen/xmtp.identity.associations.rs +++ b/xmtp_proto/src/gen/xmtp.identity.associations.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// RecoverableEcdsaSignature for EIP-191 and V2 signatures #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/xmtp_proto/src/gen/xmtp.identity.associations.serde.rs b/xmtp_proto/src/gen/xmtp.identity.associations.serde.rs index abe5f4671..89ceafd87 100644 --- a/xmtp_proto/src/gen/xmtp.identity.associations.serde.rs +++ b/xmtp_proto/src/gen/xmtp.identity.associations.serde.rs @@ -518,6 +518,7 @@ impl serde::Serialize for CreateInbox { } if self.nonce != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("nonce", ToString::to_string(&self.nonce).as_str())?; } if let Some(v) = self.initial_address_signature.as_ref() { @@ -785,6 +786,7 @@ impl serde::Serialize for IdentityUpdate { } if self.client_timestamp_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("clientTimestampNs", ToString::to_string(&self.client_timestamp_ns).as_str())?; } if !self.inbox_id.is_empty() { @@ -1129,6 +1131,7 @@ impl serde::Serialize for MemberIdentifier { } member_identifier::Kind::InstallationPublicKey(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationPublicKey", pbjson::private::base64::encode(&v).as_str())?; } } @@ -1341,6 +1344,7 @@ impl serde::Serialize for RecoverableEcdsaSignature { let mut struct_ser = serializer.serialize_struct("xmtp.identity.associations.RecoverableEcdsaSignature", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } struct_ser.end() @@ -1438,10 +1442,12 @@ impl serde::Serialize for RecoverableEd25519Signature { let mut struct_ser = serializer.serialize_struct("xmtp.identity.associations.RecoverableEd25519Signature", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } if !self.public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("publicKey", pbjson::private::base64::encode(&self.public_key).as_str())?; } struct_ser.end() @@ -1811,10 +1817,12 @@ impl serde::Serialize for SmartContractWalletSignature { } if self.block_number != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("blockNumber", ToString::to_string(&self.block_number).as_str())?; } if !self.signature.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("signature", pbjson::private::base64::encode(&self.signature).as_str())?; } if !self.chain_rpc_url.is_empty() { diff --git a/xmtp_proto/src/gen/xmtp.identity.rs b/xmtp_proto/src/gen/xmtp.identity.rs index b4e176f71..2fb0a5ab9 100644 --- a/xmtp_proto/src/gen/xmtp.identity.rs +++ b/xmtp_proto/src/gen/xmtp.identity.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// A credential that can be used in MLS leaf nodes #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/xmtp_proto/src/gen/xmtp.keystore_api.v1.rs b/xmtp_proto/src/gen/xmtp.keystore_api.v1.rs index 6aae2dd4d..65ac75867 100644 --- a/xmtp_proto/src/gen/xmtp.keystore_api.v1.rs +++ b/xmtp_proto/src/gen/xmtp.keystore_api.v1.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Wrapper class for errors from the Keystore API #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -322,7 +323,7 @@ pub mod save_invites_response { } /// CreateAuthTokenRequest is used to create an auth token for the XMTP API #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct CreateAuthTokenRequest { #[prost(uint64, optional, tag="1")] pub timestamp_ns: ::core::option::Option, @@ -337,7 +338,7 @@ pub struct SaveV1ConversationsRequest { } /// Placeholder response type for SaveV1Conversations #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SaveV1ConversationsResponse { } /// Response for GetV2Conversations @@ -357,7 +358,7 @@ pub struct GetKeystoreStatusRequest { } /// Response to GetKeystoreStatusRequest #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GetKeystoreStatusResponse { #[prost(enumeration="get_keystore_status_response::KeystoreStatus", tag="1")] pub status: i32, @@ -432,7 +433,7 @@ pub struct SignDigestRequest { /// Nested message and enum types in `SignDigestRequest`. pub mod sign_digest_request { #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Signer { #[prost(bool, tag="2")] IdentityKey(bool), @@ -442,21 +443,21 @@ pub mod sign_digest_request { } /// GetRefreshJobRequest is used to get the last run time of a refresh job #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GetRefreshJobRequest { #[prost(enumeration="JobType", tag="1")] pub job_type: i32, } /// GetRefreshJobResponse is used to return the last run time of a refresh job #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GetRefreshJobResponse { #[prost(int64, tag="1")] pub last_run_ns: i64, } /// SetRefreshJobRequest is used to set the last run time of a refresh job #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SetRefeshJobRequest { #[prost(enumeration="JobType", tag="1")] pub job_type: i32, @@ -465,7 +466,7 @@ pub struct SetRefeshJobRequest { } /// SetRefreshJobResponse is an empty response type #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SetRefreshJobResponse { } /// A mapping of topics to their decrypted invitations diff --git a/xmtp_proto/src/gen/xmtp.keystore_api.v1.serde.rs b/xmtp_proto/src/gen/xmtp.keystore_api.v1.serde.rs index 7160e4c43..004d74ecf 100644 --- a/xmtp_proto/src/gen/xmtp.keystore_api.v1.serde.rs +++ b/xmtp_proto/src/gen/xmtp.keystore_api.v1.serde.rs @@ -13,6 +13,7 @@ impl serde::Serialize for CreateAuthTokenRequest { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.CreateAuthTokenRequest", len)?; if let Some(v) = self.timestamp_ns.as_ref() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestampNs", ToString::to_string(&v).as_str())?; } struct_ser.end() @@ -123,6 +124,7 @@ impl serde::Serialize for CreateInviteRequest { } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if let Some(v) = self.consent_proof.as_ref() { @@ -261,6 +263,7 @@ impl serde::Serialize for CreateInviteResponse { } if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } struct_ser.end() @@ -566,6 +569,7 @@ impl serde::Serialize for decrypt_response::response::Success { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.DecryptResponse.Response.Success", len)?; if !self.decrypted.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("decrypted", pbjson::private::base64::encode(&self.decrypted).as_str())?; } struct_ser.end() @@ -766,6 +770,7 @@ impl serde::Serialize for decrypt_v1_request::Request { } if !self.header_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("headerBytes", pbjson::private::base64::encode(&self.header_bytes).as_str())?; } if self.is_sender { @@ -999,6 +1004,7 @@ impl serde::Serialize for decrypt_v2_request::Request { } if !self.header_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("headerBytes", pbjson::private::base64::encode(&self.header_bytes).as_str())?; } if !self.content_topic.is_empty() { @@ -1326,6 +1332,7 @@ impl serde::Serialize for encrypt_response::response::Success { } if !self.sender_hmac.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("senderHmac", pbjson::private::base64::encode(&self.sender_hmac).as_str())?; } struct_ser.end() @@ -1532,10 +1539,12 @@ impl serde::Serialize for encrypt_v1_request::Request { } if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } if !self.header_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("headerBytes", pbjson::private::base64::encode(&self.header_bytes).as_str())?; } struct_ser.end() @@ -1752,10 +1761,12 @@ impl serde::Serialize for encrypt_v2_request::Request { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.EncryptV2Request.Request", len)?; if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } if !self.header_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("headerBytes", pbjson::private::base64::encode(&self.header_bytes).as_str())?; } if !self.content_topic.is_empty() { @@ -2144,6 +2155,7 @@ impl serde::Serialize for get_conversation_hmac_keys_response::HmacKeyData { } if !self.hmac_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("hmacKey", pbjson::private::base64::encode(&self.hmac_key).as_str())?; } struct_ser.end() @@ -2879,6 +2891,7 @@ impl serde::Serialize for GetRefreshJobResponse { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.GetRefreshJobResponse", len)?; if self.last_run_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("lastRunNs", ToString::to_string(&self.last_run_ns).as_str())?; } struct_ser.end() @@ -3448,10 +3461,12 @@ impl serde::Serialize for save_invites_request::Request { } if self.timestamp_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestampNs", ToString::to_string(&self.timestamp_ns).as_str())?; } if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } struct_ser.end() @@ -4116,6 +4131,7 @@ impl serde::Serialize for self_decrypt_request::Request { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.SelfDecryptRequest.Request", len)?; if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } struct_ser.end() @@ -4301,6 +4317,7 @@ impl serde::Serialize for self_encrypt_request::Request { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.SelfEncryptRequest.Request", len)?; if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } struct_ser.end() @@ -4595,6 +4612,7 @@ impl serde::Serialize for self_encrypt_response::response::Success { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.SelfEncryptResponse.Response.Success", len)?; if !self.encrypted.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("encrypted", pbjson::private::base64::encode(&self.encrypted).as_str())?; } struct_ser.end() @@ -4697,6 +4715,7 @@ impl serde::Serialize for SetRefeshJobRequest { } if self.last_run_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("lastRunNs", ToString::to_string(&self.last_run_ns).as_str())?; } struct_ser.end() @@ -4878,6 +4897,7 @@ impl serde::Serialize for SignDigestRequest { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.SignDigestRequest", len)?; if !self.digest.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("digest", pbjson::private::base64::encode(&self.digest).as_str())?; } if let Some(v) = self.signer.as_ref() { @@ -5103,6 +5123,7 @@ impl serde::Serialize for topic_map::TopicData { let mut struct_ser = serializer.serialize_struct("xmtp.keystore_api.v1.TopicMap.TopicData", len)?; if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if !self.peer_address.is_empty() { diff --git a/xmtp_proto/src/gen/xmtp.message_api.v1.rs b/xmtp_proto/src/gen/xmtp.message_api.v1.rs index 2c049df29..cdc466411 100644 --- a/xmtp_proto/src/gen/xmtp.message_api.v1.rs +++ b/xmtp_proto/src/gen/xmtp.message_api.v1.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Token is used by clients to prove to the nodes /// that they are serving a specific wallet. #[allow(clippy::derive_partial_eq_without_eq)] @@ -101,7 +102,7 @@ pub struct PublishRequest { } /// Empty message as a response for Publish #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PublishResponse { } /// Subscribe @@ -113,7 +114,7 @@ pub struct SubscribeRequest { } /// SubscribeAll #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SubscribeAllRequest { } /// Query diff --git a/xmtp_proto/src/gen/xmtp.message_api.v1.serde.rs b/xmtp_proto/src/gen/xmtp.message_api.v1.serde.rs index bb932c481..2fae2170d 100644 --- a/xmtp_proto/src/gen/xmtp.message_api.v1.serde.rs +++ b/xmtp_proto/src/gen/xmtp.message_api.v1.serde.rs @@ -19,6 +19,7 @@ impl serde::Serialize for AuthData { } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } struct_ser.end() @@ -413,10 +414,12 @@ impl serde::Serialize for Envelope { } if self.timestamp_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestampNs", ToString::to_string(&self.timestamp_ns).as_str())?; } if !self.message.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("message", pbjson::private::base64::encode(&self.message).as_str())?; } struct_ser.end() @@ -540,10 +543,12 @@ impl serde::Serialize for IndexCursor { let mut struct_ser = serializer.serialize_struct("xmtp.message_api.v1.IndexCursor", len)?; if !self.digest.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("digest", pbjson::private::base64::encode(&self.digest).as_str())?; } if self.sender_time_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("senderTimeNs", ToString::to_string(&self.sender_time_ns).as_str())?; } struct_ser.end() @@ -955,10 +960,12 @@ impl serde::Serialize for QueryRequest { } if self.start_time_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("startTimeNs", ToString::to_string(&self.start_time_ns).as_str())?; } if self.end_time_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("endTimeNs", ToString::to_string(&self.end_time_ns).as_str())?; } if let Some(v) = self.paging_info.as_ref() { @@ -1450,6 +1457,7 @@ impl serde::Serialize for Token { } if !self.auth_data_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("authDataBytes", pbjson::private::base64::encode(&self.auth_data_bytes).as_str())?; } if let Some(v) = self.auth_data_signature.as_ref() { diff --git a/xmtp_proto/src/gen/xmtp.message_api.v1.tonic.rs b/xmtp_proto/src/gen/xmtp.message_api.v1.tonic.rs index 771e0335f..5876f968a 100644 --- a/xmtp_proto/src/gen/xmtp.message_api.v1.tonic.rs +++ b/xmtp_proto/src/gen/xmtp.message_api.v1.tonic.rs @@ -1,6 +1,6 @@ // @generated /// Generated client implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod message_api_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -237,7 +237,7 @@ pub mod message_api_client { } } /// Generated server implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod message_api_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -295,19 +295,17 @@ pub mod message_api_server { } #[derive(Debug)] pub struct MessageApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl MessageApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -370,7 +368,6 @@ pub mod message_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/xmtp.message_api.v1.MessageApi/Publish" => { #[allow(non_camel_case_types)] @@ -401,7 +398,6 @@ pub mod message_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = PublishSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -448,7 +444,6 @@ pub mod message_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = SubscribeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -497,7 +492,6 @@ pub mod message_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = Subscribe2Svc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -544,7 +538,6 @@ pub mod message_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = SubscribeAllSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -588,7 +581,6 @@ pub mod message_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = QuerySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -634,7 +626,6 @@ pub mod message_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = BatchQuerySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -656,8 +647,11 @@ pub mod message_api_server { Ok( http::Response::builder() .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) .body(empty_body()) .unwrap(), ) @@ -678,16 +672,6 @@ pub mod message_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for MessageApiServer { const NAME: &'static str = "xmtp.message_api.v1.MessageApi"; } diff --git a/xmtp_proto/src/gen/xmtp.message_contents.rs b/xmtp_proto/src/gen/xmtp.message_contents.rs index 1d3966343..823855286 100644 --- a/xmtp_proto/src/gen/xmtp.message_contents.rs +++ b/xmtp_proto/src/gen/xmtp.message_contents.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Signature represents a generalized public key signature, /// defined as a union to support cryptographic algorithm agility. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/xmtp_proto/src/gen/xmtp.message_contents.serde.rs b/xmtp_proto/src/gen/xmtp.message_contents.serde.rs index 8df3e631b..279816e33 100644 --- a/xmtp_proto/src/gen/xmtp.message_contents.serde.rs +++ b/xmtp_proto/src/gen/xmtp.message_contents.serde.rs @@ -116,14 +116,17 @@ impl serde::Serialize for ciphertext::Aes256gcmHkdfsha256 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.Ciphertext.Aes256gcmHkdfsha256", len)?; if !self.hkdf_salt.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("hkdfSalt", pbjson::private::base64::encode(&self.hkdf_salt).as_str())?; } if !self.gcm_nonce.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("gcmNonce", pbjson::private::base64::encode(&self.gcm_nonce).as_str())?; } if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } struct_ser.end() @@ -526,6 +529,7 @@ impl serde::Serialize for ConsentProofPayload { } if self.timestamp != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestamp", ToString::to_string(&self.timestamp).as_str())?; } if self.payload_version != 0 { @@ -1180,6 +1184,7 @@ impl serde::Serialize for ConversationReference { } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if let Some(v) = self.context.as_ref() { @@ -1360,6 +1365,7 @@ impl serde::Serialize for DecodedMessage { } if self.sent_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("sentNs", ToString::to_string(&self.sent_ns).as_str())?; } if !self.content_topic.is_empty() { @@ -1370,6 +1376,7 @@ impl serde::Serialize for DecodedMessage { } if !self.content_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("contentBytes", pbjson::private::base64::encode(&self.content_bytes).as_str())?; } struct_ser.end() @@ -1551,6 +1558,7 @@ impl serde::Serialize for EciesMessage { match v { ecies_message::Version::V1(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("v1", pbjson::private::base64::encode(&v).as_str())?; } } @@ -1671,6 +1679,7 @@ impl serde::Serialize for EncodedContent { } if !self.content.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("content", pbjson::private::base64::encode(&self.content).as_str())?; } struct_ser.end() @@ -1910,6 +1919,7 @@ impl serde::Serialize for EncryptedPrivateKeyBundleV1 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.EncryptedPrivateKeyBundleV1", len)?; if !self.wallet_pre_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("walletPreKey", pbjson::private::base64::encode(&self.wallet_pre_key).as_str())?; } if let Some(v) = self.ciphertext.as_ref() { @@ -2031,6 +2041,7 @@ impl serde::Serialize for FrameAction { } if !self.action_body.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("actionBody", pbjson::private::base64::encode(&self.action_body).as_str())?; } struct_ser.end() @@ -2179,6 +2190,7 @@ impl serde::Serialize for FrameActionBody { } if self.timestamp != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestamp", ToString::to_string(&self.timestamp).as_str())?; } if !self.opaque_conversation_identifier.is_empty() { @@ -2538,6 +2550,7 @@ impl serde::Serialize for invitation_v1::Aes256gcmHkdfsha256 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.InvitationV1.Aes256gcmHkdfsha256", len)?; if !self.key_material.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("keyMaterial", pbjson::private::base64::encode(&self.key_material).as_str())?; } struct_ser.end() @@ -2865,6 +2878,7 @@ impl serde::Serialize for MessageHeaderV1 { } if self.timestamp != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestamp", ToString::to_string(&self.timestamp).as_str())?; } struct_ser.end() @@ -2984,6 +2998,7 @@ impl serde::Serialize for MessageHeaderV2 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.MessageHeaderV2", len)?; if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if !self.topic.is_empty() { @@ -3096,6 +3111,7 @@ impl serde::Serialize for MessageV1 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.MessageV1", len)?; if !self.header_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("headerBytes", pbjson::private::base64::encode(&self.header_bytes).as_str())?; } if let Some(v) = self.ciphertext.as_ref() { @@ -3214,6 +3230,7 @@ impl serde::Serialize for MessageV2 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.MessageV2", len)?; if !self.header_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("headerBytes", pbjson::private::base64::encode(&self.header_bytes).as_str())?; } if let Some(v) = self.ciphertext.as_ref() { @@ -3221,6 +3238,7 @@ impl serde::Serialize for MessageV2 { } if let Some(v) = self.sender_hmac.as_ref() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("senderHmac", pbjson::private::base64::encode(&v).as_str())?; } if let Some(v) = self.should_push.as_ref() { @@ -3362,6 +3380,7 @@ impl serde::Serialize for PrivateKey { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.PrivateKey", len)?; if self.timestamp != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestamp", ToString::to_string(&self.timestamp).as_str())?; } if let Some(v) = self.public_key.as_ref() { @@ -3490,6 +3509,7 @@ impl serde::Serialize for private_key::Secp256k1 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.PrivateKey.Secp256k1", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } struct_ser.end() @@ -4734,6 +4754,7 @@ impl serde::Serialize for PublicKey { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.PublicKey", len)?; if self.timestamp != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestamp", ToString::to_string(&self.timestamp).as_str())?; } if let Some(v) = self.signature.as_ref() { @@ -4862,6 +4883,7 @@ impl serde::Serialize for public_key::Secp256k1Uncompressed { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.PublicKey.Secp256k1Uncompressed", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } struct_ser.end() @@ -5174,6 +5196,7 @@ impl serde::Serialize for SealedInvitationHeaderV1 { } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } struct_ser.end() @@ -5294,6 +5317,7 @@ impl serde::Serialize for SealedInvitationV1 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SealedInvitationV1", len)?; if !self.header_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("headerBytes", pbjson::private::base64::encode(&self.header_bytes).as_str())?; } if let Some(v) = self.ciphertext.as_ref() { @@ -5517,6 +5541,7 @@ impl serde::Serialize for signature::EcdsaCompact { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.Signature.ECDSACompact", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } if self.recovery != 0 { @@ -5630,6 +5655,7 @@ impl serde::Serialize for signature::WalletEcdsaCompact { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.Signature.WalletECDSACompact", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } if self.recovery != 0 { @@ -5746,6 +5772,7 @@ impl serde::Serialize for SignedContent { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SignedContent", len)?; if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } if let Some(v) = self.sender.as_ref() { @@ -5871,6 +5898,7 @@ impl serde::Serialize for SignedEciesCiphertext { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SignedEciesCiphertext", len)?; if !self.ecies_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("eciesBytes", pbjson::private::base64::encode(&self.ecies_bytes).as_str())?; } if let Some(v) = self.signature.as_ref() { @@ -5989,18 +6017,22 @@ impl serde::Serialize for signed_ecies_ciphertext::Ecies { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SignedEciesCiphertext.Ecies", len)?; if !self.ephemeral_public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("ephemeralPublicKey", pbjson::private::base64::encode(&self.ephemeral_public_key).as_str())?; } if !self.iv.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("iv", pbjson::private::base64::encode(&self.iv).as_str())?; } if !self.mac.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("mac", pbjson::private::base64::encode(&self.mac).as_str())?; } if !self.ciphertext.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("ciphertext", pbjson::private::base64::encode(&self.ciphertext).as_str())?; } struct_ser.end() @@ -6138,6 +6170,7 @@ impl serde::Serialize for SignedPayload { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SignedPayload", len)?; if !self.payload.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; } if let Some(v) = self.signature.as_ref() { @@ -6252,6 +6285,7 @@ impl serde::Serialize for SignedPrivateKey { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SignedPrivateKey", len)?; if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if let Some(v) = self.public_key.as_ref() { @@ -6381,6 +6415,7 @@ impl serde::Serialize for signed_private_key::Secp256k1 { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SignedPrivateKey.Secp256k1", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } struct_ser.end() @@ -6478,6 +6513,7 @@ impl serde::Serialize for SignedPublicKey { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.SignedPublicKey", len)?; if !self.key_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("keyBytes", pbjson::private::base64::encode(&self.key_bytes).as_str())?; } if let Some(v) = self.signature.as_ref() { @@ -6700,6 +6736,7 @@ impl serde::Serialize for UnsignedPublicKey { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.UnsignedPublicKey", len)?; if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if let Some(v) = self.union.as_ref() { @@ -6815,6 +6852,7 @@ impl serde::Serialize for unsigned_public_key::Secp256k1Uncompressed { let mut struct_ser = serializer.serialize_struct("xmtp.message_contents.UnsignedPublicKey.Secp256k1Uncompressed", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } struct_ser.end() diff --git a/xmtp_proto/src/gen/xmtp.mls.api.v1.rs b/xmtp_proto/src/gen/xmtp.mls.api.v1.rs index f82343b35..203e98980 100644 --- a/xmtp_proto/src/gen/xmtp.mls.api.v1.rs +++ b/xmtp_proto/src/gen/xmtp.mls.api.v1.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Full representation of a welcome message #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -274,7 +275,7 @@ pub mod get_identity_updates_response { } /// Pagination config for queries #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PagingInfo { #[prost(enumeration="SortDirection", tag="1")] pub direction: i32, diff --git a/xmtp_proto/src/gen/xmtp.mls.api.v1.serde.rs b/xmtp_proto/src/gen/xmtp.mls.api.v1.serde.rs index 93a7ceaed..fd4aa1e43 100644 --- a/xmtp_proto/src/gen/xmtp.mls.api.v1.serde.rs +++ b/xmtp_proto/src/gen/xmtp.mls.api.v1.serde.rs @@ -200,6 +200,7 @@ impl serde::Serialize for fetch_key_packages_response::KeyPackage { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.FetchKeyPackagesResponse.KeyPackage", len)?; if !self.key_package_tls_serialized.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("keyPackageTlsSerialized", pbjson::private::base64::encode(&self.key_package_tls_serialized).as_str())?; } struct_ser.end() @@ -301,6 +302,7 @@ impl serde::Serialize for GetIdentityUpdatesRequest { } if self.start_time_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("startTimeNs", ToString::to_string(&self.start_time_ns).as_str())?; } struct_ser.end() @@ -502,10 +504,12 @@ impl serde::Serialize for get_identity_updates_response::NewInstallationUpdate { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.GetIdentityUpdatesResponse.NewInstallationUpdate", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } if !self.credential_identity.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("credentialIdentity", pbjson::private::base64::encode(&self.credential_identity).as_str())?; } struct_ser.end() @@ -615,6 +619,7 @@ impl serde::Serialize for get_identity_updates_response::RevokedInstallationUpda let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.GetIdentityUpdatesResponse.RevokedInstallationUpdate", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } struct_ser.end() @@ -713,6 +718,7 @@ impl serde::Serialize for get_identity_updates_response::Update { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update", len)?; if self.timestamp_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("timestampNs", ToString::to_string(&self.timestamp_ns).as_str())?; } if let Some(v) = self.kind.as_ref() { @@ -1041,22 +1047,27 @@ impl serde::Serialize for group_message::V1 { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.GroupMessage.V1", len)?; if self.id != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if !self.group_id.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("groupId", pbjson::private::base64::encode(&self.group_id).as_str())?; } if !self.data.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } if !self.sender_hmac.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("senderHmac", pbjson::private::base64::encode(&self.sender_hmac).as_str())?; } struct_ser.end() @@ -1305,10 +1316,12 @@ impl serde::Serialize for group_message_input::V1 { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.GroupMessageInput.V1", len)?; if !self.data.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } if !self.sender_hmac.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("senderHmac", pbjson::private::base64::encode(&self.sender_hmac).as_str())?; } struct_ser.end() @@ -1417,6 +1430,7 @@ impl serde::Serialize for KeyPackageUpload { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.KeyPackageUpload", len)?; if !self.key_package_tls_serialized.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("keyPackageTlsSerialized", pbjson::private::base64::encode(&self.key_package_tls_serialized).as_str())?; } struct_ser.end() @@ -1526,6 +1540,7 @@ impl serde::Serialize for PagingInfo { } if self.id_cursor != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("idCursor", ToString::to_string(&self.id_cursor).as_str())?; } struct_ser.end() @@ -1648,6 +1663,7 @@ impl serde::Serialize for QueryGroupMessagesRequest { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.QueryGroupMessagesRequest", len)?; if !self.group_id.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("groupId", pbjson::private::base64::encode(&self.group_id).as_str())?; } if let Some(v) = self.paging_info.as_ref() { @@ -1870,6 +1886,7 @@ impl serde::Serialize for QueryWelcomeMessagesRequest { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.QueryWelcomeMessagesRequest", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } if let Some(v) = self.paging_info.as_ref() { @@ -2199,6 +2216,7 @@ impl serde::Serialize for RegisterInstallationResponse { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.RegisterInstallationResponse", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } struct_ser.end() @@ -2297,6 +2315,7 @@ impl serde::Serialize for RevokeInstallationRequest { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.RevokeInstallationRequest", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } if let Some(v) = self.wallet_signature.as_ref() { @@ -2757,10 +2776,12 @@ impl serde::Serialize for subscribe_group_messages_request::Filter { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.SubscribeGroupMessagesRequest.Filter", len)?; if !self.group_id.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("groupId", pbjson::private::base64::encode(&self.group_id).as_str())?; } if self.id_cursor != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("idCursor", ToString::to_string(&self.id_cursor).as_str())?; } struct_ser.end() @@ -2964,10 +2985,12 @@ impl serde::Serialize for subscribe_welcome_messages_request::Filter { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.Filter", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } if self.id_cursor != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("idCursor", ToString::to_string(&self.id_cursor).as_str())?; } struct_ser.end() @@ -3295,22 +3318,27 @@ impl serde::Serialize for welcome_message::V1 { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.WelcomeMessage.V1", len)?; if self.id != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?; } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } if !self.data.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } if !self.hpke_public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("hpkePublicKey", pbjson::private::base64::encode(&self.hpke_public_key).as_str())?; } struct_ser.end() @@ -3562,14 +3590,17 @@ impl serde::Serialize for welcome_message_input::V1 { let mut struct_ser = serializer.serialize_struct("xmtp.mls.api.v1.WelcomeMessageInput.V1", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } if !self.data.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; } if !self.hpke_public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("hpkePublicKey", pbjson::private::base64::encode(&self.hpke_public_key).as_str())?; } struct_ser.end() diff --git a/xmtp_proto/src/gen/xmtp.mls.api.v1.tonic.rs b/xmtp_proto/src/gen/xmtp.mls.api.v1.tonic.rs index 9afd5d202..72b522e23 100644 --- a/xmtp_proto/src/gen/xmtp.mls.api.v1.tonic.rs +++ b/xmtp_proto/src/gen/xmtp.mls.api.v1.tonic.rs @@ -1,6 +1,6 @@ // @generated /// Generated client implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod mls_api_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -361,7 +361,7 @@ pub mod mls_api_client { } } /// Generated server implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod mls_api_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -448,19 +448,17 @@ pub mod mls_api_server { } #[derive(Debug)] pub struct MlsApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl MlsApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -523,7 +521,6 @@ pub mod mls_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/xmtp.mls.api.v1.MlsApi/SendGroupMessages" => { #[allow(non_camel_case_types)] @@ -554,7 +551,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = SendGroupMessagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -600,7 +596,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = SendWelcomeMessagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -646,7 +641,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = RegisterInstallationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -692,7 +686,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = UploadKeyPackageSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -738,7 +731,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = FetchKeyPackagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -784,7 +776,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = RevokeInstallationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -830,7 +821,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = GetIdentityUpdatesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -876,7 +866,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = QueryGroupMessagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -922,7 +911,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = QueryWelcomeMessagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -971,7 +959,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = SubscribeGroupMessagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1022,7 +1009,6 @@ pub mod mls_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = SubscribeWelcomeMessagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -1044,8 +1030,11 @@ pub mod mls_api_server { Ok( http::Response::builder() .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) .body(empty_body()) .unwrap(), ) @@ -1066,16 +1055,6 @@ pub mod mls_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for MlsApiServer { const NAME: &'static str = "xmtp.mls.api.v1.MlsApi"; } diff --git a/xmtp_proto/src/gen/xmtp.mls.database.rs b/xmtp_proto/src/gen/xmtp.mls.database.rs index d8334b7e2..d78b25e87 100644 --- a/xmtp_proto/src/gen/xmtp.mls.database.rs +++ b/xmtp_proto/src/gen/xmtp.mls.database.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// The data required to publish a message #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/xmtp_proto/src/gen/xmtp.mls.database.serde.rs b/xmtp_proto/src/gen/xmtp.mls.database.serde.rs index de5526005..53757c57c 100644 --- a/xmtp_proto/src/gen/xmtp.mls.database.serde.rs +++ b/xmtp_proto/src/gen/xmtp.mls.database.serde.rs @@ -842,10 +842,12 @@ impl serde::Serialize for post_commit_action::Installation { let mut struct_ser = serializer.serialize_struct("xmtp.mls.database.PostCommitAction.Installation", len)?; if !self.installation_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&self.installation_key).as_str())?; } if !self.hpke_public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("hpkePublicKey", pbjson::private::base64::encode(&self.hpke_public_key).as_str())?; } struct_ser.end() @@ -961,6 +963,7 @@ impl serde::Serialize for post_commit_action::SendWelcomes { } if !self.welcome_message.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("welcomeMessage", pbjson::private::base64::encode(&self.welcome_message).as_str())?; } struct_ser.end() @@ -1351,6 +1354,7 @@ impl serde::Serialize for send_message_data::V1 { let mut struct_ser = serializer.serialize_struct("xmtp.mls.database.SendMessageData.V1", len)?; if !self.payload_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("payloadBytes", pbjson::private::base64::encode(&self.payload_bytes).as_str())?; } struct_ser.end() diff --git a/xmtp_proto/src/gen/xmtp.mls.message_contents.rs b/xmtp_proto/src/gen/xmtp.mls.message_contents.rs index 79aed020b..64881f6f3 100644 --- a/xmtp_proto/src/gen/xmtp.mls.message_contents.rs +++ b/xmtp_proto/src/gen/xmtp.mls.message_contents.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Used for "Grant Messaging Access" associations #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs b/xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs index 22304194c..6b8b584f8 100644 --- a/xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs +++ b/xmtp_proto/src/gen/xmtp.mls.message_contents.serde.rs @@ -387,10 +387,12 @@ impl serde::Serialize for CredentialRevocation { match v { credential_revocation::PublicKey::InstallationKey(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationKey", pbjson::private::base64::encode(&v).as_str())?; } credential_revocation::PublicKey::UnsignedLegacyCreateIdentityKey(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("unsignedLegacyCreateIdentityKey", pbjson::private::base64::encode(&v).as_str())?; } } @@ -626,6 +628,7 @@ impl serde::Serialize for EdDsaSignature { let mut struct_ser = serializer.serialize_struct("xmtp.mls.message_contents.EdDsaSignature", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } struct_ser.end() @@ -746,6 +749,7 @@ impl serde::Serialize for EncodedContent { } if !self.content.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("content", pbjson::private::base64::encode(&self.content).as_str())?; } struct_ser.end() @@ -906,6 +910,7 @@ impl serde::Serialize for GrantMessagingAccessAssociation { } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } struct_ser.end() @@ -2825,6 +2830,7 @@ impl serde::Serialize for MessageHistoryKeyType { match v { message_history_key_type::Key::Chacha20Poly1305(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("chacha20Poly1305", pbjson::private::base64::encode(&v).as_str())?; } } @@ -3547,6 +3553,7 @@ impl serde::Serialize for MlsCredential { let mut struct_ser = serializer.serialize_struct("xmtp.mls.message_contents.MlsCredential", len)?; if !self.installation_public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationPublicKey", pbjson::private::base64::encode(&self.installation_public_key).as_str())?; } if let Some(v) = self.association.as_ref() { @@ -4172,6 +4179,7 @@ impl serde::Serialize for plaintext_envelope::V1 { let mut struct_ser = serializer.serialize_struct("xmtp.mls.message_contents.PlaintextEnvelope.V1", len)?; if !self.content.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("content", pbjson::private::base64::encode(&self.content).as_str())?; } if !self.idempotency_key.is_empty() { @@ -4289,6 +4297,7 @@ impl serde::Serialize for plaintext_envelope::V2 { match v { plaintext_envelope::v2::MessageType::Content(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("content", pbjson::private::base64::encode(&v).as_str())?; } plaintext_envelope::v2::MessageType::Request(v) => { @@ -4605,6 +4614,7 @@ impl serde::Serialize for RecoverableEcdsaSignature { let mut struct_ser = serializer.serialize_struct("xmtp.mls.message_contents.RecoverableEcdsaSignature", len)?; if !self.bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("bytes", pbjson::private::base64::encode(&self.bytes).as_str())?; } struct_ser.end() @@ -4719,6 +4729,7 @@ impl serde::Serialize for RevokeMessagingAccessAssociation { } if self.created_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("createdNs", ToString::to_string(&self.created_ns).as_str())?; } struct_ser.end() diff --git a/xmtp_proto/src/gen/xmtp.mls_validation.v1.rs b/xmtp_proto/src/gen/xmtp.mls_validation.v1.rs index 185633227..c1a1c1bdf 100644 --- a/xmtp_proto/src/gen/xmtp.mls_validation.v1.rs +++ b/xmtp_proto/src/gen/xmtp.mls_validation.v1.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Validates a Inbox-ID Key Package Type #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/xmtp_proto/src/gen/xmtp.mls_validation.v1.serde.rs b/xmtp_proto/src/gen/xmtp.mls_validation.v1.serde.rs index c27c9243b..599dc577b 100644 --- a/xmtp_proto/src/gen/xmtp.mls_validation.v1.serde.rs +++ b/xmtp_proto/src/gen/xmtp.mls_validation.v1.serde.rs @@ -325,6 +325,7 @@ impl serde::Serialize for validate_group_messages_request::GroupMessage { let mut struct_ser = serializer.serialize_struct("xmtp.mls_validation.v1.ValidateGroupMessagesRequest.GroupMessage", len)?; if !self.group_message_bytes_tls_serialized.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("groupMessageBytesTlsSerialized", pbjson::private::base64::encode(&self.group_message_bytes_tls_serialized).as_str())?; } struct_ser.end() @@ -751,10 +752,12 @@ impl serde::Serialize for validate_inbox_id_key_packages_response::Response { } if !self.installation_public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationPublicKey", pbjson::private::base64::encode(&self.installation_public_key).as_str())?; } if self.expiration != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("expiration", ToString::to_string(&self.expiration).as_str())?; } struct_ser.end() @@ -998,6 +1001,7 @@ impl serde::Serialize for validate_inbox_ids_request::ValidationRequest { } if !self.installation_public_key.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationPublicKey", pbjson::private::base64::encode(&self.installation_public_key).as_str())?; } if !self.identity_updates.is_empty() { @@ -1433,6 +1437,7 @@ impl serde::Serialize for validate_key_packages_request::KeyPackage { let mut struct_ser = serializer.serialize_struct("xmtp.mls_validation.v1.ValidateKeyPackagesRequest.KeyPackage", len)?; if !self.key_package_bytes_tls_serialized.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("keyPackageBytesTlsSerialized", pbjson::private::base64::encode(&self.key_package_bytes_tls_serialized).as_str())?; } if self.is_inbox_id_credential { @@ -1655,6 +1660,7 @@ impl serde::Serialize for validate_key_packages_response::ValidationResponse { } if !self.installation_id.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("installationId", pbjson::private::base64::encode(&self.installation_id).as_str())?; } if !self.account_address.is_empty() { @@ -1662,10 +1668,12 @@ impl serde::Serialize for validate_key_packages_response::ValidationResponse { } if !self.credential_identity_bytes.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("credentialIdentityBytes", pbjson::private::base64::encode(&self.credential_identity_bytes).as_str())?; } if self.expiration != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("expiration", ToString::to_string(&self.expiration).as_str())?; } struct_ser.end() diff --git a/xmtp_proto/src/gen/xmtp.mls_validation.v1.tonic.rs b/xmtp_proto/src/gen/xmtp.mls_validation.v1.tonic.rs index 09d1b7b63..706b7c66f 100644 --- a/xmtp_proto/src/gen/xmtp.mls_validation.v1.tonic.rs +++ b/xmtp_proto/src/gen/xmtp.mls_validation.v1.tonic.rs @@ -1,6 +1,6 @@ // @generated /// Generated client implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod validation_api_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -238,7 +238,7 @@ pub mod validation_api_client { } } /// Generated server implementations. -#[cfg(feature = "tonic")] +#[cfg(not(target_arch = "wasm32"))] pub mod validation_api_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -283,19 +283,17 @@ pub mod validation_api_server { } #[derive(Debug)] pub struct ValidationApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl ValidationApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -358,7 +356,6 @@ pub mod validation_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/xmtp.mls_validation.v1.ValidationApi/ValidateKeyPackages" => { #[allow(non_camel_case_types)] @@ -390,7 +387,6 @@ pub mod validation_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = ValidateKeyPackagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -440,7 +436,6 @@ pub mod validation_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = ValidateGroupMessagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -487,7 +482,6 @@ pub mod validation_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = GetAssociationStateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -537,7 +531,6 @@ pub mod validation_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = ValidateInboxIdKeyPackagesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -584,7 +577,6 @@ pub mod validation_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = ValidateInboxIdsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -606,8 +598,11 @@ pub mod validation_api_server { Ok( http::Response::builder() .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) .body(empty_body()) .unwrap(), ) @@ -628,16 +623,6 @@ pub mod validation_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for ValidationApiServer { const NAME: &'static str = "xmtp.mls_validation.v1.ValidationApi"; } diff --git a/xmtp_proto/src/gen/xmtp.xmtpv4.rs b/xmtp_proto/src/gen/xmtp.xmtpv4.rs index 02bf3e7c3..50f7a5533 100644 --- a/xmtp_proto/src/gen/xmtp.xmtpv4.rs +++ b/xmtp_proto/src/gen/xmtp.xmtpv4.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. /// Data visible to the server that has been authenticated by the client. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -59,7 +60,7 @@ pub struct UnsignedOriginatorEnvelope { } /// An alternative to a signature for blockchain payloads #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BlockchainProof { #[prost(uint64, tag="1")] pub block_number: u64, @@ -127,7 +128,7 @@ pub mod envelopes_query { OriginatorId(u32), } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum LastSeen { #[prost(uint64, tag="3")] OriginatorSid(u64), diff --git a/xmtp_proto/src/gen/xmtp.xmtpv4.serde.rs b/xmtp_proto/src/gen/xmtp.xmtpv4.serde.rs index fe6f55447..59ddc3e60 100644 --- a/xmtp_proto/src/gen/xmtp.xmtpv4.serde.rs +++ b/xmtp_proto/src/gen/xmtp.xmtpv4.serde.rs @@ -22,6 +22,7 @@ impl serde::Serialize for AuthenticatedData { } if !self.target_topic.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("targetTopic", pbjson::private::base64::encode(&self.target_topic).as_str())?; } if !self.last_originator_sids.is_empty() { @@ -425,6 +426,7 @@ impl serde::Serialize for BlockchainProof { let mut struct_ser = serializer.serialize_struct("xmtp.xmtpv4.BlockchainProof", len)?; if self.block_number != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("blockNumber", ToString::to_string(&self.block_number).as_str())?; } if self.publisher_id != 0 { @@ -712,6 +714,7 @@ impl serde::Serialize for EnvelopesQuery { match v { envelopes_query::Filter::Topic(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("topic", pbjson::private::base64::encode(&v).as_str())?; } envelopes_query::Filter::OriginatorId(v) => { @@ -723,10 +726,12 @@ impl serde::Serialize for EnvelopesQuery { match v { envelopes_query::LastSeen::OriginatorSid(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("originatorSid", ToString::to_string(&v).as_str())?; } envelopes_query::LastSeen::GatewaySid(v) => { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("gatewaySid", ToString::to_string(&v).as_str())?; } } @@ -856,6 +861,7 @@ impl serde::Serialize for GatewayEnvelope { let mut struct_ser = serializer.serialize_struct("xmtp.xmtpv4.GatewayEnvelope", len)?; if self.gateway_sid != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("gatewaySid", ToString::to_string(&self.gateway_sid).as_str())?; } if let Some(v) = self.originator_envelope.as_ref() { @@ -1159,6 +1165,7 @@ impl serde::Serialize for OriginatorEnvelope { let mut struct_ser = serializer.serialize_struct("xmtp.xmtpv4.OriginatorEnvelope", len)?; if !self.unsigned_originator_envelope.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("unsignedOriginatorEnvelope", pbjson::private::base64::encode(&self.unsigned_originator_envelope).as_str())?; } if let Some(v) = self.proof.as_ref() { @@ -1291,6 +1298,7 @@ impl serde::Serialize for PayerEnvelope { let mut struct_ser = serializer.serialize_struct("xmtp.xmtpv4.PayerEnvelope", len)?; if !self.unsigned_client_envelope.is_empty() { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("unsignedClientEnvelope", pbjson::private::base64::encode(&self.unsigned_client_envelope).as_str())?; } if let Some(v) = self.payer_signature.as_ref() { @@ -1792,10 +1800,12 @@ impl serde::Serialize for UnsignedOriginatorEnvelope { let mut struct_ser = serializer.serialize_struct("xmtp.xmtpv4.UnsignedOriginatorEnvelope", len)?; if self.originator_sid != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("originatorSid", ToString::to_string(&self.originator_sid).as_str())?; } if self.originator_ns != 0 { #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("originatorNs", ToString::to_string(&self.originator_ns).as_str())?; } if let Some(v) = self.payer_envelope.as_ref() { diff --git a/xmtp_proto/src/gen/xmtp.xmtpv4.tonic.rs b/xmtp_proto/src/gen/xmtp.xmtpv4.tonic.rs index 9005427c5..3f775e2e1 100644 --- a/xmtp_proto/src/gen/xmtp.xmtpv4.tonic.rs +++ b/xmtp_proto/src/gen/xmtp.xmtpv4.tonic.rs @@ -1,5 +1,6 @@ // @generated /// Generated client implementations. +#[cfg(not(target_arch = "wasm32"))] pub mod replication_api_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -179,6 +180,7 @@ pub mod replication_api_client { } } /// Generated server implementations. +#[cfg(not(target_arch = "wasm32"))] pub mod replication_api_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -226,19 +228,17 @@ pub mod replication_api_server { */ #[derive(Debug)] pub struct ReplicationApiServer { - inner: _Inner, + inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - struct _Inner(Arc); impl ReplicationApiServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), @@ -301,7 +301,6 @@ pub mod replication_api_server { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); match req.uri().path() { "/xmtp.xmtpv4.ReplicationApi/BatchSubscribeEnvelopes" => { #[allow(non_camel_case_types)] @@ -340,7 +339,6 @@ pub mod replication_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = BatchSubscribeEnvelopesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -387,7 +385,6 @@ pub mod replication_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = QueryEnvelopesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -434,7 +431,6 @@ pub mod replication_api_server { let max_encoding_message_size = self.max_encoding_message_size; let inner = self.inner.clone(); let fut = async move { - let inner = inner.0; let method = PublishEnvelopeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) @@ -456,8 +452,11 @@ pub mod replication_api_server { Ok( http::Response::builder() .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") + .header("grpc-status", tonic::Code::Unimplemented as i32) + .header( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ) .body(empty_body()) .unwrap(), ) @@ -478,16 +477,6 @@ pub mod replication_api_server { } } } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } impl tonic::server::NamedService for ReplicationApiServer { const NAME: &'static str = "xmtp.xmtpv4.ReplicationApi"; }