From 37551cacce246f9ca1759a3c851c69fbe07e092b Mon Sep 17 00:00:00 2001 From: otsmr Date: Mon, 8 Jun 2026 22:58:01 +0200 Subject: [PATCH] merge into one single crate --- rust/Cargo.lock | 38 +- rust/Cargo.toml | 6 +- rust/build.rs | 5 + rust/src/backup/backup_identity.rs | 2 +- rust/src/bridge/callbacks.rs | 6 +- rust/src/bridge/callbacks/user_discovery.rs | 8 +- rust/src/bridge/mod.rs | 10 +- rust/src/bridge/wrapper/backup.rs | 4 +- rust/src/context.rs | 2 +- rust/src/database/tables/mod.rs | 3 +- rust/src/error.rs | 2 +- rust/src/keys/main_key.rs | 2 +- rust/src/lib.rs | 2 + .../src/passwordless_recovery/mod.rs | 0 .../src/passwordless_recovery/traits.rs | 0 .../src/passwordless_recovery/types.proto | 0 .../src/user_discovery/README.md | 0 .../src/user_discovery/error.rs | 0 .../src/user_discovery/mod.rs | 46 +- .../user_discovery/stores/in_memory_store.rs | 6 +- rust/src/user_discovery/stores/mod.rs | 4 + .../src/user_discovery/tests.rs | 0 .../src/user_discovery/traits.rs | 10 +- .../src/user_discovery/types.proto | 0 rust_dependencies/.gitignore | 0 rust_dependencies/Cargo.lock | 1639 ----------------- rust_dependencies/Cargo.toml | 3 - rust_dependencies/protocols/Cargo.toml | 29 - rust_dependencies/protocols/build.rs | 11 - .../protocols/src/key_verification/error.rs | 30 - .../protocols/src/key_verification/mod.rs | 194 -- .../stores/in_memory_store.rs | 22 - .../src/key_verification/stores/mod.rs | 3 - .../protocols/src/key_verification/traits.rs | 7 - .../src/key_verification/types.proto | 12 - rust_dependencies/protocols/src/lib.rs | 3 - .../src/user_discovery/stores/mod.rs | 2 - scripts/generate_proto.sh | 2 +- 38 files changed, 79 insertions(+), 2034 deletions(-) create mode 100644 rust/build.rs rename {rust_dependencies/protocols => rust}/src/passwordless_recovery/mod.rs (100%) rename {rust_dependencies/protocols => rust}/src/passwordless_recovery/traits.rs (100%) rename {rust_dependencies/protocols => rust}/src/passwordless_recovery/types.proto (100%) rename {rust_dependencies/protocols => rust}/src/user_discovery/README.md (100%) rename {rust_dependencies/protocols => rust}/src/user_discovery/error.rs (100%) rename {rust_dependencies/protocols => rust}/src/user_discovery/mod.rs (97%) rename {rust_dependencies/protocols => rust}/src/user_discovery/stores/in_memory_store.rs (98%) create mode 100644 rust/src/user_discovery/stores/mod.rs rename {rust_dependencies/protocols => rust}/src/user_discovery/tests.rs (100%) rename {rust_dependencies/protocols => rust}/src/user_discovery/traits.rs (93%) rename {rust_dependencies/protocols => rust}/src/user_discovery/types.proto (100%) delete mode 100644 rust_dependencies/.gitignore delete mode 100644 rust_dependencies/Cargo.lock delete mode 100644 rust_dependencies/Cargo.toml delete mode 100644 rust_dependencies/protocols/Cargo.toml delete mode 100644 rust_dependencies/protocols/build.rs delete mode 100644 rust_dependencies/protocols/src/key_verification/error.rs delete mode 100644 rust_dependencies/protocols/src/key_verification/mod.rs delete mode 100644 rust_dependencies/protocols/src/key_verification/stores/in_memory_store.rs delete mode 100644 rust_dependencies/protocols/src/key_verification/stores/mod.rs delete mode 100644 rust_dependencies/protocols/src/key_verification/traits.rs delete mode 100644 rust_dependencies/protocols/src/key_verification/types.proto delete mode 100644 rust_dependencies/protocols/src/lib.rs delete mode 100644 rust_dependencies/protocols/src/user_discovery/stores/mod.rs diff --git a/rust/Cargo.lock b/rust/Cargo.lock index bbf942dc..a5fe4cdf 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -391,12 +391,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const-oid" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" - [[package]] name = "core-foundation" version = "0.10.1" @@ -562,7 +556,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid 0.9.6", + "const-oid", "pem-rfc7468", "zeroize", ] @@ -594,7 +588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid 0.9.6", + "const-oid", "crypto-common 0.1.7", "subtle", ] @@ -606,7 +600,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c" dependencies = [ "block-buffer 0.12.0", - "const-oid 0.10.2", "crypto-common 0.2.1", "ctutils", ] @@ -1857,25 +1850,6 @@ dependencies = [ "prost", ] -[[package]] -name = "protocols" -version = "0.1.0" -dependencies = [ - "base64", - "blahaj", - "hmac 0.13.0", - "prost", - "prost-build", - "rand 0.10.1", - "serde", - "serde_json", - "sha2 0.11.0", - "sqlx", - "thiserror 2.0.18", - "tokio", - "tracing", -] - [[package]] name = "quote" version = "1.0.45" @@ -1991,7 +1965,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ - "const-oid 0.9.6", + "const-oid", "digest 0.10.7", "num-bigint-dig", "num-integer", @@ -2012,20 +1986,24 @@ dependencies = [ "aes-gcm", "android-native-keyring-store", "apple-native-keyring-store", + "base64", + "blahaj", "chrono", "flutter_rust_bridge", "hex", "hkdf", + "hmac 0.13.0", "keyring-core", "libsqlite3-sys", "paste", "postcard", "pretty_env_logger", + "prost", "prost-build", - "protocols", "rand 0.10.1", "scrypt", "serde", + "serde_json", "sha2 0.10.9", "sqlx", "tempfile", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 26ca7546..129bc1af 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -36,7 +36,11 @@ libsqlite3-sys = { version = "0.35.0", features = [ tokio = { version = "1.44", features = ["full"] } tracing = "0.1.44" rand = "0.10.1" -protocols = { path = "../rust_dependencies/protocols" } +prost = "0.14.1" +blahaj = "0.6.0" +serde_json = "1.0" +base64 = "0.22.1" +hmac = "0.13.0" hkdf = "0.12.4" sha2 = "0.10.8" aes-gcm = "0.10.3" diff --git a/rust/build.rs b/rust/build.rs new file mode 100644 index 00000000..135361e9 --- /dev/null +++ b/rust/build.rs @@ -0,0 +1,5 @@ +use std::io::Result; +fn main() -> Result<()> { + prost_build::compile_protos(&["src/user_discovery/types.proto"], &["src/"])?; + Ok(()) +} diff --git a/rust/src/backup/backup_identity.rs b/rust/src/backup/backup_identity.rs index 1fa49bd7..a81c1e4f 100644 --- a/rust/src/backup/backup_identity.rs +++ b/rust/src/backup/backup_identity.rs @@ -52,7 +52,7 @@ impl BackupIdentity { let key_manager: KeyManager = postcard::from_bytes(&decrypted_bytes)?; - key_manager.store_to_keychain(&secure_storage)?; + key_manager.store_to_keychain(secure_storage)?; Ok(()) } diff --git a/rust/src/bridge/callbacks.rs b/rust/src/bridge/callbacks.rs index 1b94d68f..988d9623 100644 --- a/rust/src/bridge/callbacks.rs +++ b/rust/src/bridge/callbacks.rs @@ -2,8 +2,8 @@ pub(crate) mod log; mod macros; pub(crate) mod user_discovery; +use crate::user_discovery::traits::{AnnouncedUser, OtherPromotion}; use flutter_rust_bridge::DartFnFuture; -use protocols::user_discovery::traits::{AnnouncedUser, OtherPromotion}; use crate::error::{Result, TwonlyError}; use crate::{callback_generator, frb_generated::StreamSink}; @@ -50,7 +50,9 @@ pub(crate) fn get_callbacks() -> Result { let caller_opt = CURRENT_CALLBACK_ID.try_with(|&c| c).ok(); let lock = FLUTTER_CALLBACKS.read().unwrap(); - let map = lock.as_ref().ok_or(TwonlyError::MissingCallbackInitialization)?; + let map = lock + .as_ref() + .ok_or(TwonlyError::MissingCallbackInitialization)?; if let Some(id) = caller_opt { if let Some(cb) = map.get(&id) { diff --git a/rust/src/bridge/callbacks/user_discovery.rs b/rust/src/bridge/callbacks/user_discovery.rs index c9b390b7..2f4c4136 100644 --- a/rust/src/bridge/callbacks/user_discovery.rs +++ b/rust/src/bridge/callbacks/user_discovery.rs @@ -1,9 +1,10 @@ use crate::bridge::callbacks::get_callbacks; use crate::bridge::get_twonly_flutter; use crate::error::TwonlyError; -use protocols::user_discovery::error::{Result, UserDiscoveryError}; -use protocols::user_discovery::traits::UserDiscoveryUtils; -use protocols::user_discovery::traits::{AnnouncedUser, OtherPromotion, UserDiscoveryStore}; +use crate::user_discovery::error::{Result, UserDiscoveryError}; +use crate::user_discovery::traits::UserDiscoveryUtils; +use crate::user_discovery::traits::{AnnouncedUser, OtherPromotion, UserDiscoveryStore}; +#[cfg(test)] use std::collections::HashMap; use std::path::PathBuf; @@ -148,6 +149,7 @@ impl UserDiscoveryStore for UserDiscoveryStoreFlutter { .ok_or(TwonlyError::DartError.into()) } + #[cfg(test)] async fn get_all_announced_users( &self, ) -> Result)>>> { diff --git a/rust/src/bridge/mod.rs b/rust/src/bridge/mod.rs index f675cbb7..31a00057 100644 --- a/rust/src/bridge/mod.rs +++ b/rust/src/bridge/mod.rs @@ -13,12 +13,12 @@ use crate::error::Result; use crate::error::TwonlyError; use crate::keys::KeyManager; use crate::secure_storage::SecureStorage; +use crate::user_discovery::UserDiscovery; use crate::utils::Shared; use flutter_rust_bridge::frb; -use protocols::user_discovery::UserDiscovery; -pub use protocols::user_discovery::traits::AnnouncedUser; -pub use protocols::user_discovery::traits::OtherPromotion; +pub use crate::user_discovery::traits::AnnouncedUser; +pub use crate::user_discovery::traits::OtherPromotion; use tokio::sync::Mutex; pub struct InitConfig { @@ -57,9 +57,9 @@ pub(crate) struct TwonlyFlutter { pub(super) fn get_twonly_flutter() -> Result<&'static TwonlyFlutter> { let ctx = Context::get_static()?; if let Context::Flutter(twonly) = ctx { - return Ok(twonly); + Ok(twonly) } else { - return Err(TwonlyError::Initialization); + Err(TwonlyError::Initialization) } } diff --git a/rust/src/bridge/wrapper/backup.rs b/rust/src/bridge/wrapper/backup.rs index 26f92441..d5f81309 100644 --- a/rust/src/bridge/wrapper/backup.rs +++ b/rust/src/bridge/wrapper/backup.rs @@ -53,7 +53,7 @@ impl RustBackupIdentity { pub async fn get_identity_backup_bytes() -> Result> { let key_manager = get_twonly_flutter()?.key_manager.lock().await; - return BackupIdentity::encrypt_key_manager(&key_manager); + BackupIdentity::encrypt_key_manager(&key_manager) } pub async fn restore_identity_backup( @@ -70,7 +70,7 @@ impl RustBackupIdentity { impl RustBackupArchive { pub async fn create_backup_archive() -> Result<(String, String)> { let ctx = Context::get_static()?; - let path = BackupArchive::create_backup(&ctx).await?; + let path = BackupArchive::create_backup(ctx).await?; let key_manager = get_twonly_flutter()?.key_manager.lock().await; let token = hex::encode(key_manager.main_key.get_backup_download_token()); Ok((token, path.canonicalize()?.to_string_lossy().to_string())) diff --git a/rust/src/context.rs b/rust/src/context.rs index d409b523..b0e92bb3 100644 --- a/rust/src/context.rs +++ b/rust/src/context.rs @@ -1,3 +1,4 @@ +use crate::user_discovery::UserDiscovery; use crate::{ bridge::{ callbacks::user_discovery::{UserDiscoveryStoreFlutter, UserDiscoveryUtilsFlutter}, @@ -9,7 +10,6 @@ use crate::{ log::init_tracing, utils::Shared, }; -use protocols::user_discovery::UserDiscovery; use std::{path::PathBuf, sync::Arc}; use tokio::sync::{Mutex, OnceCell}; use zeroize::Zeroize; diff --git a/rust/src/database/tables/mod.rs b/rust/src/database/tables/mod.rs index 7d27b9ea..09002155 100644 --- a/rust/src/database/tables/mod.rs +++ b/rust/src/database/tables/mod.rs @@ -88,11 +88,10 @@ macro_rules! generate_test_select { #[cfg(test)] #[tokio::test] async fn []() { - use crate::database::Database; use tempfile::tempdir; let dir = tempdir().unwrap(); let db_path = dir.path().join("test.sqlite").display().to_string(); - let db = Database::new(&db_path, None, false).await.unwrap(); + let db = crate::database::Database::new(&db_path, None, false).await.unwrap(); db.run_migrations().await.unwrap(); $struct::$insert_fn(&db.pool, $($arg),+).await.unwrap(); diff --git a/rust/src/error.rs b/rust/src/error.rs index 7a688384..18ac9bc4 100644 --- a/rust/src/error.rs +++ b/rust/src/error.rs @@ -1,5 +1,5 @@ +use crate::user_discovery::error::UserDiscoveryError; use hex::FromHexError; -use protocols::user_discovery::error::UserDiscoveryError; use scrypt::errors::{InvalidOutputLen, InvalidParams}; use thiserror::Error; use zip::result::ZipError; diff --git a/rust/src/keys/main_key.rs b/rust/src/keys/main_key.rs index 0612a127..3bb94bd6 100644 --- a/rust/src/keys/main_key.rs +++ b/rust/src/keys/main_key.rs @@ -61,7 +61,7 @@ impl MainKey { self.decrypt_with_info(b"backup_key", encrypted_backup) } - /// Encrypts a newly generated media key using the derived Media Main Key. + // Encrypts a newly generated media key using the derived Media Main Key. // pub fn encrypt_media_key(&self, media_key: &[u8; 32]) -> Vec { // self.encrypt_with_info(b"media_main_key", media_key) // } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 255e19a3..4792ba90 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -6,6 +6,8 @@ mod error; mod frb_generated; mod keys; mod log; +mod passwordless_recovery; mod secure_storage; mod standalone; +mod user_discovery; mod utils; diff --git a/rust_dependencies/protocols/src/passwordless_recovery/mod.rs b/rust/src/passwordless_recovery/mod.rs similarity index 100% rename from rust_dependencies/protocols/src/passwordless_recovery/mod.rs rename to rust/src/passwordless_recovery/mod.rs diff --git a/rust_dependencies/protocols/src/passwordless_recovery/traits.rs b/rust/src/passwordless_recovery/traits.rs similarity index 100% rename from rust_dependencies/protocols/src/passwordless_recovery/traits.rs rename to rust/src/passwordless_recovery/traits.rs diff --git a/rust_dependencies/protocols/src/passwordless_recovery/types.proto b/rust/src/passwordless_recovery/types.proto similarity index 100% rename from rust_dependencies/protocols/src/passwordless_recovery/types.proto rename to rust/src/passwordless_recovery/types.proto diff --git a/rust_dependencies/protocols/src/user_discovery/README.md b/rust/src/user_discovery/README.md similarity index 100% rename from rust_dependencies/protocols/src/user_discovery/README.md rename to rust/src/user_discovery/README.md diff --git a/rust_dependencies/protocols/src/user_discovery/error.rs b/rust/src/user_discovery/error.rs similarity index 100% rename from rust_dependencies/protocols/src/user_discovery/error.rs rename to rust/src/user_discovery/error.rs diff --git a/rust_dependencies/protocols/src/user_discovery/mod.rs b/rust/src/user_discovery/mod.rs similarity index 97% rename from rust_dependencies/protocols/src/user_discovery/mod.rs rename to rust/src/user_discovery/mod.rs index cfe0d2ac..c683f882 100644 --- a/rust_dependencies/protocols/src/user_discovery/mod.rs +++ b/rust/src/user_discovery/mod.rs @@ -4,9 +4,10 @@ pub mod stores; pub mod tests; pub mod traits; -use std::collections::{HashMap, HashSet}; +#[cfg(test)] +use std::collections::HashMap; +use std::collections::{HashSet}; use std::sync::Arc; -use std::u8; use blahaj::{Share, Sharks}; use prost::Message; use serde::{Deserialize, Serialize}; @@ -184,6 +185,7 @@ impl UserDiscovery)>>)` - All connections the user has discovered /// * `Err(UserDiscoveryError)` - If there where erros in the store. /// + #[cfg(test)] pub async fn get_all_announced_users( &self, ) -> Result)>>> { @@ -384,7 +386,8 @@ impl UserDiscovery UserDiscovery> = dealer @@ -476,12 +479,10 @@ impl UserDiscovery UserDiscovery UserDiscovery UserDiscovery UserDiscovery UserDiscovery Result>> { let storage = self.storage(); let elements = storage.own_promotions[(version as usize)..] - .into_iter() + .iter() .map(|(_, promotion)| promotion.to_owned()) .collect(); Ok(elements) @@ -107,7 +107,7 @@ impl UserDiscoveryStore for InMemoryStore { if let Some(element) = element { return Ok(Some(element.1.to_owned())); } - return Ok(None); + Ok(None) } async fn store_other_promotion(&self, promotion: OtherPromotion) -> Result<()> { @@ -158,7 +158,7 @@ impl UserDiscoveryStore for InMemoryStore { let entry = storage .announced_users .entry(announced_user.clone()) - .or_insert(vec![]); + .or_default(); if announced_user.user_id != from_contact_id { if let Some(found) = entry.iter_mut().find(|x| x.0 == from_contact_id) { found.1 = public_key_verified_timestamp; diff --git a/rust/src/user_discovery/stores/mod.rs b/rust/src/user_discovery/stores/mod.rs new file mode 100644 index 00000000..8548743a --- /dev/null +++ b/rust/src/user_discovery/stores/mod.rs @@ -0,0 +1,4 @@ +#[cfg(test)] +mod in_memory_store; +#[cfg(test)] +pub(super) use in_memory_store::InMemoryStore; diff --git a/rust_dependencies/protocols/src/user_discovery/tests.rs b/rust/src/user_discovery/tests.rs similarity index 100% rename from rust_dependencies/protocols/src/user_discovery/tests.rs rename to rust/src/user_discovery/tests.rs diff --git a/rust_dependencies/protocols/src/user_discovery/traits.rs b/rust/src/user_discovery/traits.rs similarity index 93% rename from rust_dependencies/protocols/src/user_discovery/traits.rs rename to rust/src/user_discovery/traits.rs index c9dcb507..a7b65a98 100644 --- a/rust_dependencies/protocols/src/user_discovery/traits.rs +++ b/rust/src/user_discovery/traits.rs @@ -1,9 +1,14 @@ +#[cfg(test)] use std::collections::HashMap; use crate::user_discovery::error::Result; use crate::user_discovery::UserID; use std::future::Future; +/// Type alias used in `UserDiscoveryStore::get_all_announced_users`. +#[cfg(test)] +pub type AnnouncedUserMap = HashMap)>>; + #[derive(Clone, sqlx::FromRow)] pub struct OtherPromotion { pub promotion_id: u32, @@ -65,9 +70,8 @@ pub trait UserDiscoveryStore { public_key_verified_timestamp: Option, ) -> impl Future> + Send; - fn get_all_announced_users( - &self, - ) -> impl Future)>>>> + Send; + #[cfg(test)] + fn get_all_announced_users(&self) -> impl Future> + Send; fn get_contact_promotion( &self, diff --git a/rust_dependencies/protocols/src/user_discovery/types.proto b/rust/src/user_discovery/types.proto similarity index 100% rename from rust_dependencies/protocols/src/user_discovery/types.proto rename to rust/src/user_discovery/types.proto diff --git a/rust_dependencies/.gitignore b/rust_dependencies/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/rust_dependencies/Cargo.lock b/rust_dependencies/Cargo.lock deleted file mode 100644 index 2a1c057b..00000000 --- a/rust_dependencies/Cargo.lock +++ /dev/null @@ -1,1639 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - -[[package]] -name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bitflags" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" - -[[package]] -name = "blahaj" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5106bf2680d585dc5f29711b8aa5dde353180b8e14af89b7f0424f760c84e7ce" -dependencies = [ - "hashbrown 0.15.5", - "rand 0.8.6", - "zeroize", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" -dependencies = [ - "hybrid-array", -] - -[[package]] -name = "bytes" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "chacha20" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "rand_core 0.10.1", -] - -[[package]] -name = "cmov" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "const-oid" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - -[[package]] -name = "crossbeam-queue" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-common" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" -dependencies = [ - "hybrid-array", -] - -[[package]] -name = "ctutils" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" -dependencies = [ - "cmov", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common 0.1.7", -] - -[[package]] -name = "digest" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c" -dependencies = [ - "block-buffer 0.12.0", - "const-oid", - "crypto-common 0.2.1", - "ctutils", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" -dependencies = [ - "serde", -] - -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "event-listener" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "fastrand" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" - -[[package]] -name = "fixedbitset" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" - -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-core" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" - -[[package]] -name = "futures-intrusive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot", -] - -[[package]] -name = "futures-io" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" - -[[package]] -name = "futures-sink" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" - -[[package]] -name = "futures-task" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" - -[[package]] -name = "futures-util" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" -dependencies = [ - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "rand_core 0.10.1", - "wasip2", - "wasip3", -] - -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.1.5", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.2.0", -] - -[[package]] -name = "hashbrown" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" - -[[package]] -name = "hashlink" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" -dependencies = [ - "hashbrown 0.15.5", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" -dependencies = [ - "digest 0.11.2", -] - -[[package]] -name = "humantime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" - -[[package]] -name = "hybrid-array" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3944cf8cf766b40e2a1a333ee5e9b563f854d5fa49d6a8ca2764e97c6eddb214" -dependencies = [ - "typenum", -] - -[[package]] -name = "icu_collections" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" -dependencies = [ - "displaydoc", - "potential_utf", - "utf8_iter", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" - -[[package]] -name = "icu_properties" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" - -[[package]] -name = "icu_provider" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "indexmap" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" -dependencies = [ - "equivalent", - "hashbrown 0.17.0", - "serde", - "serde_core", -] - -[[package]] -name = "is-terminal" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys", -] - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" - -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - -[[package]] -name = "libc" -version = "0.2.185" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" - -[[package]] -name = "linux-raw-sys" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" - -[[package]] -name = "litemap" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "mio" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" -dependencies = [ - "libc", - "wasi", - "windows-sys", -] - -[[package]] -name = "multimap" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "petgraph" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" -dependencies = [ - "fixedbitset", - "hashbrown 0.15.5", - "indexmap", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "potential_utf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" -dependencies = [ - "zerovec", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "pretty_env_logger" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" -dependencies = [ - "env_logger", - "log", -] - -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" -dependencies = [ - "heck", - "itertools", - "log", - "multimap", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn", - "tempfile", -] - -[[package]] -name = "prost-derive" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "prost-types" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" -dependencies = [ - "prost", -] - -[[package]] -name = "protocols" -version = "0.1.0" -dependencies = [ - "base64", - "blahaj", - "hmac", - "pretty_env_logger", - "prost", - "prost-build", - "rand 0.10.1", - "serde", - "serde_json", - "sha2 0.11.0", - "sqlx", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quote" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - -[[package]] -name = "rand" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" -dependencies = [ - "libc", - "rand_chacha", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" -dependencies = [ - "chacha20", - "getrandom 0.4.2", - "rand_core 0.10.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", -] - -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" - -[[package]] -name = "rustix" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "semver" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.149" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" -dependencies = [ - "itoa", - "memchr", - "serde", - "serde_core", - "zmij", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "digest 0.11.2", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno", - "libc", -] - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "sqlx" -version = "0.9.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "decccfa5f2f3eac95eb68085cfe69a0172fa9711666c3a634cfc806d4fb74a47" -dependencies = [ - "sqlx-core", - "sqlx-macros", -] - -[[package]] -name = "sqlx-core" -version = "0.9.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86854e8c6aba0dafcf1c04b4836b0b7fa3a20c560e3554567afefe1258fa4e60" -dependencies = [ - "base64", - "bytes", - "cfg-if", - "crc", - "crossbeam-queue", - "either", - "event-listener", - "futures-core", - "futures-intrusive", - "futures-io", - "futures-util", - "hashbrown 0.16.1", - "hashlink", - "indexmap", - "log", - "memchr", - "percent-encoding", - "serde", - "sha2 0.10.9", - "smallvec", - "thiserror", - "tracing", - "url", -] - -[[package]] -name = "sqlx-macros" -version = "0.9.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7aab9442ed1568e3aed6c368737226ee4e0e8d1deb0e0887fa6bf15282ace44" -dependencies = [ - "proc-macro2", - "quote", - "sqlx-core", - "sqlx-macros-core", - "syn", -] - -[[package]] -name = "sqlx-macros-core" -version = "0.9.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34eb4976b8f02ac57ee98d4ce40cd1aad7ab31d9792977bc3171f787ba6ba2fb" -dependencies = [ - "cfg-if", - "dotenvy", - "either", - "heck", - "hex", - "proc-macro2", - "quote", - "serde", - "serde_json", - "sha2 0.10.9", - "sqlx-core", - "syn", - "url", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - -[[package]] -name = "syn" -version = "2.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tempfile" -version = "3.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" -dependencies = [ - "fastrand", - "getrandom 0.4.2", - "once_cell", - "rustix", - "windows-sys", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tinystr" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.52.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys", -] - -[[package]] -name = "tokio-macros" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "typenum" -version = "1.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.3+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" -dependencies = [ - "wit-bindgen 0.57.1", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen 0.51.0", -] - -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - -[[package]] -name = "writeable" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" - -[[package]] -name = "yoke" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerofrom" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerotrie" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zmij" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/rust_dependencies/Cargo.toml b/rust_dependencies/Cargo.toml deleted file mode 100644 index 1f2f14b9..00000000 --- a/rust_dependencies/Cargo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[workspace] -members = ["protocols"] -resolver = "3" diff --git a/rust_dependencies/protocols/Cargo.toml b/rust_dependencies/protocols/Cargo.toml deleted file mode 100644 index 7196dd26..00000000 --- a/rust_dependencies/protocols/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "protocols" -version = "0.1.0" -edition = "2021" - -[lib] -crate-type = ["rlib", "cdylib", "staticlib"] - -[dependencies] -thiserror = "2.0.18" -tracing = "0.1.44" -serde = "1.0.228" -prost = "0.14.1" -rand = "0.10.1" -blahaj = "0.6.0" -serde_json = "1.0" -base64 = "0.22.1" -hmac = "0.13.0" -sha2 = "0.11.0" -tokio = { version = "1.44", features = ["full"] } -sqlx = { version = "0.9.0-alpha.1", default-features = false, features = [ - "derive", -] } - -[dev-dependencies] -pretty_env_logger = "0.5.0" - -[build-dependencies] -prost-build = "0.14.1" diff --git a/rust_dependencies/protocols/build.rs b/rust_dependencies/protocols/build.rs deleted file mode 100644 index 12e4744b..00000000 --- a/rust_dependencies/protocols/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -use std::io::Result; -fn main() -> Result<()> { - prost_build::compile_protos( - &[ - "src/user_discovery/types.proto", - "src/key_verification/types.proto", - ], - &["src/"], - )?; - Ok(()) -} diff --git a/rust_dependencies/protocols/src/key_verification/error.rs b/rust_dependencies/protocols/src/key_verification/error.rs deleted file mode 100644 index a23b1d1c..00000000 --- a/rust_dependencies/protocols/src/key_verification/error.rs +++ /dev/null @@ -1,30 +0,0 @@ -use prost::DecodeError; -use thiserror::Error; - -pub type Result = core::result::Result; - -#[derive(Error, Debug)] -pub enum KeyVerificationError { - #[error("The prefix deeplink url must start with https:// and end with a #")] - InvalidDeeplinkPrefix, - - #[error("Invalid qr text")] - InvalidQrText, - - #[error( - "Contact user_id is known and the stored public_key does not match the received user id" - )] - InvalidPublicKeyAndUserIdCombination, - - #[error("Store error: `{0}`")] - Store(String), - - #[error("`{0}`")] - Base64(#[from] base64::DecodeError), - - #[error("`{0}`")] - Prost(#[from] DecodeError), - - #[error("`{0}`")] - Hmac(#[from] hmac::digest::InvalidLength), -} diff --git a/rust_dependencies/protocols/src/key_verification/mod.rs b/rust_dependencies/protocols/src/key_verification/mod.rs deleted file mode 100644 index f3493473..00000000 --- a/rust_dependencies/protocols/src/key_verification/mod.rs +++ /dev/null @@ -1,194 +0,0 @@ -use crate::key_verification::{error::KeyVerificationError, traits::KeyVerificationStore}; -use crate::user_discovery::UserID; -use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine as _}; -use error::Result; -use hmac::{Hmac, KeyInit, Mac}; -use prost::Message; -use sha2::Sha256; - -pub(crate) mod error; -pub mod stores; -pub mod traits; - -include!(concat!(env!("OUT_DIR"), "/key_verification.rs")); - -pub struct KeyVerificationConfig { - /// The link prefix for the qr code which should be registered as a deeplink on Android and a universal link on iOS - /// The link MUST start with a https:// and end with a # - /// The link should contain the username of the user so the application can show the scanned user without internet - /// Example: https://me.twonly.eu/tobi# - deeplink_prefix: String, - /// The user ID used to calculate the verification proof - user_id: UserID, - /// The public_key of the user to calculate the verification proof - public_key: Vec, -} - -pub struct ScannedUser { - pub user_id: UserID, - pub public_key: Vec, - pub verification_proof: Vec, -} - -pub struct KeyVerification { - store: Store, - config: KeyVerificationConfig, -} - -impl KeyVerification { - pub fn new(store: Store, config: KeyVerificationConfig) -> Result> { - if !config.deeplink_prefix.starts_with("https://") || !config.deeplink_prefix.ends_with("#") - { - return Err(KeyVerificationError::InvalidDeeplinkPrefix); - } - Ok(Self { store, config }) - } - - /// Generates the a string which should be displayed in the UI so others can scan it. - pub fn generate_qr_text(&self) -> Result { - // 10 Bytes should be enough. Tokens are only valid for one day and then deleted. - let secret_verification_token: Vec = rand::random_iter().take(16).collect(); - - self.store - .push_new_secret_verification_token(&secret_verification_token)?; - - let verification_data = VerificationData { - user_id: self.config.user_id, - public_key: self.config.public_key.clone(), - secret_verification_token, - }; - - let verification_data_bytes = verification_data.encode_to_vec(); - let encoded = URL_SAFE_NO_PAD.encode(verification_data_bytes); - - Ok(format!("{}{}", self.config.deeplink_prefix, encoded)) - } - - /// Handles the scanned qr code text and creates a response message - /// which can be send to the other person - pub fn get_user_from_scanned_qr_text(&self, received_text: &str) -> Result { - let splitted: Vec<_> = received_text.split('#').collect(); - if splitted.len() != 2 { - tracing::info!("Scanned qr text does not contain a #"); - return Err(KeyVerificationError::InvalidQrText); - } - let verification_data_bytes = URL_SAFE_NO_PAD.decode(splitted[1])?; - let verification_data = VerificationData::decode(verification_data_bytes.as_slice())?; - - let mut mac = Hmac::::new_from_slice(&verification_data.secret_verification_token)?; - mac.update(&self.config.user_id.to_le_bytes()); - mac.update(&self.config.public_key); - mac.update(&verification_data.user_id.to_le_bytes()); - mac.update(&verification_data.public_key); - - let verification_proof = mac.finalize().into_bytes().to_vec(); - - Ok(ScannedUser { - user_id: verification_data.user_id, - public_key: verification_data.public_key, - verification_proof, - }) - } - - /// Checks whether the received verification proof is valid - pub fn is_received_verification_proof_valid( - &self, - from_user_id: UserID, - public_key: Vec, - verification_proof: Vec, - ) -> Result { - let verification_tokens = self.store.get_all_valid_verification_tokens()?; - - for verification_token in &verification_tokens { - let calculated_verification_proof = { - let mut mac = Hmac::::new_from_slice(verification_token)?; - mac.update(&from_user_id.to_le_bytes()); - mac.update(&public_key); - mac.update(&self.config.user_id.to_le_bytes()); - mac.update(&self.config.public_key); - mac.finalize().into_bytes().to_vec() - }; - - if calculated_verification_proof == verification_proof { - return Ok(true); - } - } - - Ok(false) - } -} - -#[cfg(test)] -mod tests { - use crate::key_verification::{stores::InMemoryStore, KeyVerification, KeyVerificationConfig}; - - #[test] - fn test_key_verification() { - let _ = pretty_env_logger::try_init(); - - const ALICE_ID: i64 = 10; - const BOB_ID: i64 = 11; - - let alice_kv = KeyVerification::new( - InMemoryStore::default(), - KeyVerificationConfig { - user_id: ALICE_ID, - public_key: vec![ALICE_ID as u8; 32], - deeplink_prefix: "https://me.twonly.eu/alice#".into(), - }, - ) - .unwrap(); - - let bob_kv = KeyVerification::new( - InMemoryStore::default(), - KeyVerificationConfig { - user_id: BOB_ID, - public_key: vec![BOB_ID as u8; 32], - deeplink_prefix: "https://me.twonly.eu/bob#".into(), - }, - ) - .unwrap(); - - let qr_code_text = alice_kv.generate_qr_text().unwrap(); - assert_eq!(qr_code_text.len(), 99); - - tracing::debug!("Generated QR-Code-Link: {qr_code_text}"); - - let scanned_user = bob_kv.get_user_from_scanned_qr_text(&qr_code_text).unwrap(); - - // THIS must be done by the application - assert_eq!(scanned_user.user_id, ALICE_ID); - assert_eq!(scanned_user.public_key, vec![ALICE_ID as u8; 32]); - - // SEND scanned_user.verification_proof over the establish e2ee protected session if public_key verification was valid. - - let valid_verification_proof = alice_kv - .is_received_verification_proof_valid( - BOB_ID, - vec![BOB_ID as u8; 32], - scanned_user.verification_proof.clone(), - ) - .unwrap(); - - assert_eq!(valid_verification_proof, true); - - let valid_verification_proof = alice_kv - .is_received_verification_proof_valid( - BOB_ID, - vec![(BOB_ID + 1) as u8; 32], - scanned_user.verification_proof.clone(), - ) - .unwrap(); - - assert_eq!(valid_verification_proof, false); - - let mut modified_proof = scanned_user.verification_proof; - modified_proof[0] = modified_proof[0] + 1; - - let valid_verification_proof = alice_kv - .is_received_verification_proof_valid(BOB_ID, vec![BOB_ID as u8; 32], modified_proof) - .unwrap(); - - assert_eq!(valid_verification_proof, false); - } -} diff --git a/rust_dependencies/protocols/src/key_verification/stores/in_memory_store.rs b/rust_dependencies/protocols/src/key_verification/stores/in_memory_store.rs deleted file mode 100644 index 160fbfb8..00000000 --- a/rust_dependencies/protocols/src/key_verification/stores/in_memory_store.rs +++ /dev/null @@ -1,22 +0,0 @@ -use std::sync::{Arc, Mutex}; - -use crate::key_verification::{error::Result, traits::KeyVerificationStore}; - -#[derive(Default)] -pub struct InMemoryStore { - verification_tokens: Arc>>>, -} - -impl KeyVerificationStore for InMemoryStore { - fn push_new_secret_verification_token(&self, token: &[u8]) -> Result<()> { - self.verification_tokens - .lock() - .unwrap() - .push(token.to_vec()); - Ok(()) - } - - fn get_all_valid_verification_tokens(&self) -> Result>> { - Ok(self.verification_tokens.lock().unwrap().clone()) - } -} diff --git a/rust_dependencies/protocols/src/key_verification/stores/mod.rs b/rust_dependencies/protocols/src/key_verification/stores/mod.rs deleted file mode 100644 index 30b1f14d..00000000 --- a/rust_dependencies/protocols/src/key_verification/stores/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -mod in_memory_store; - -pub use in_memory_store::InMemoryStore; diff --git a/rust_dependencies/protocols/src/key_verification/traits.rs b/rust_dependencies/protocols/src/key_verification/traits.rs deleted file mode 100644 index 1689e3a8..00000000 --- a/rust_dependencies/protocols/src/key_verification/traits.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::error::Result; -pub trait KeyVerificationStore { - fn push_new_secret_verification_token(&self, token: &[u8]) -> Result<()>; - /// This function should return all tokens from the last 24h - /// All other tokens can be removed from the database - fn get_all_valid_verification_tokens(&self) -> Result>>; -} diff --git a/rust_dependencies/protocols/src/key_verification/types.proto b/rust_dependencies/protocols/src/key_verification/types.proto deleted file mode 100644 index bd515eb0..00000000 --- a/rust_dependencies/protocols/src/key_verification/types.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package key_verification; - -message VerificationData { - int64 user_id = 1; - bytes public_key = 2; - bytes secret_verification_token = 3; -} - -message VerificationMessage { - bytes calculated_mac = 1; -} \ No newline at end of file diff --git a/rust_dependencies/protocols/src/lib.rs b/rust_dependencies/protocols/src/lib.rs deleted file mode 100644 index 85641306..00000000 --- a/rust_dependencies/protocols/src/lib.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod key_verification; -pub mod passwordless_recovery; -pub mod user_discovery; diff --git a/rust_dependencies/protocols/src/user_discovery/stores/mod.rs b/rust_dependencies/protocols/src/user_discovery/stores/mod.rs deleted file mode 100644 index c22f0a9e..00000000 --- a/rust_dependencies/protocols/src/user_discovery/stores/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -mod in_memory_store; -pub use in_memory_store::InMemoryStore; diff --git a/scripts/generate_proto.sh b/scripts/generate_proto.sh index e6c8ca1a..9e4fd5e9 100755 --- a/scripts/generate_proto.sh +++ b/scripts/generate_proto.sh @@ -18,7 +18,7 @@ protoc --proto_path="$CLIENT_DIR" --dart_out="$GENERATED_DIR" "qr.proto" protoc --proto_path="$CLIENT_DIR" --dart_out="$GENERATED_DIR" "data.proto" mkdir "$GENERATED_DIR/user_discovery/" &>/dev/null -protoc --proto_path="./rust_dependencies/protocols/src/user_discovery/" --dart_out="$GENERATED_DIR/user_discovery/" "types.proto" +protoc --proto_path="./rust/src/user_discovery/" --dart_out="$GENERATED_DIR/user_discovery/" "types.proto" protoc --proto_path="$CLIENT_DIR" --dart_out="$GENERATED_DIR" "push_notification.proto" protoc --proto_path="$CLIENT_DIR" --swift_out="./ios/NotificationService/" "push_notification.proto"