diff --git a/Cargo.lock b/Cargo.lock index a6d1f8e4f..4c55bf3b9 100644 Binary files a/Cargo.lock and b/Cargo.lock differ diff --git a/Cargo.toml b/Cargo.toml index 6efa9eab5..21c13170f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ rust-version = "1.80" [workspace.dependencies] # First party dependencies -sd-cloud-schema = { git = "https://github.com/spacedriveapp/cloud-services-schema", rev = "fc4b6edabd" } +sd-cloud-schema = { git = "https://github.com/spacedriveapp/cloud-services-schema", rev = "ed37fb537b" } # Third party dependencies used by one or more of our crates async-channel = "2.3" diff --git a/core/crates/cloud-services/Cargo.toml b/core/crates/cloud-services/Cargo.toml index ae1d41aca..7298a21b1 100644 --- a/core/crates/cloud-services/Cargo.toml +++ b/core/crates/cloud-services/Cargo.toml @@ -36,13 +36,12 @@ uuid = { workspace = true, features = ["serde"] } zeroize = { workspace = true } # External dependencies -anyhow = "1.0.86" -iroh-base = { version = "0.25", features = ["key"] } -iroh-net = { version = "0.25", features = ["discovery-local-network", "iroh-relay"] } -paste = "=1.0.15" -postcard = { version = "1.0.8", features = ["use-std"] } -quic-rpc = { version = "0.12.0", features = ["quinn-transport"] } -quinn = { package = "iroh-quinn", version = "0.11" } +anyhow = "1.0.86" +iroh-net = { version = "0.26", features = ["discovery-local-network", "iroh-relay"] } +paste = "=1.0.15" +postcard = { version = "1.0.8", features = ["use-std"] } +quic-rpc = { version = "0.12.1", features = ["quinn-transport"] } +quinn = { package = "iroh-quinn", version = "0.11" } # Using whatever version of reqwest that reqwest-middleware uses, just putting here to enable some features reqwest = { version = "0.12", features = ["json", "native-tls-vendored", "stream"] } reqwest-middleware = { version = "0.3", features = ["json"] } diff --git a/core/crates/cloud-services/src/key_manager/key_store.rs b/core/crates/cloud-services/src/key_manager/key_store.rs index 922597a73..9dc03aaa9 100644 --- a/core/crates/cloud-services/src/key_manager/key_store.rs +++ b/core/crates/cloud-services/src/key_manager/key_store.rs @@ -1,6 +1,9 @@ use crate::Error; -use sd_cloud_schema::sync::{groups, KeyHash}; +use sd_cloud_schema::{ + sync::{groups, KeyHash}, + NodeId, SecretKey as IrohSecretKey, +}; use sd_crypto::{ cloud::{decrypt, encrypt, secret_key::SecretKey}, primitives::{EncryptedBlock, OneShotNonce, StreamNonce}, @@ -16,7 +19,6 @@ use std::{ }; use futures::StreamExt; -use iroh_base::key::{NodeId, SecretKey as IrohSecretKey}; use serde::{Deserialize, Serialize}; use tokio::{ fs, diff --git a/core/crates/cloud-services/src/key_manager/mod.rs b/core/crates/cloud-services/src/key_manager/mod.rs index 79ac7ecaa..64007a190 100644 --- a/core/crates/cloud-services/src/key_manager/mod.rs +++ b/core/crates/cloud-services/src/key_manager/mod.rs @@ -1,6 +1,9 @@ use crate::Error; -use sd_cloud_schema::sync::{groups, KeyHash}; +use sd_cloud_schema::{ + sync::{groups, KeyHash}, + NodeId, SecretKey as IrohSecretKey, +}; use sd_crypto::{cloud::secret_key::SecretKey, CryptoRng}; use sd_utils::error::FileIOError; @@ -9,7 +12,6 @@ use std::{ path::{Path, PathBuf}, }; -use iroh_base::key::{NodeId, SecretKey as IrohSecretKey}; use tokio::{fs, sync::RwLock}; mod key_store; diff --git a/core/crates/cloud-services/src/lib.rs b/core/crates/cloud-services/src/lib.rs index a298d0e5e..615d5397d 100644 --- a/core/crates/cloud-services/src/lib.rs +++ b/core/crates/cloud-services/src/lib.rs @@ -48,7 +48,6 @@ pub use sync::{ }; // Re-exports -pub use iroh_base::key::{NodeId, SecretKey as IrohSecretKey}; pub use quic_rpc::transport::quinn::QuinnConnection; // Export URL for the auth server diff --git a/core/crates/cloud-services/src/p2p/mod.rs b/core/crates/cloud-services/src/p2p/mod.rs index cfc7b7ded..03fb12b02 100644 --- a/core/crates/cloud-services/src/p2p/mod.rs +++ b/core/crates/cloud-services/src/p2p/mod.rs @@ -5,10 +5,10 @@ use sd_cloud_schema::{ devices::{self, Device}, libraries, sync::groups::GroupWithDevices, + SecretKey as IrohSecretKey, }; use sd_crypto::{CryptoRng, SeedableRng}; -use iroh_base::key::SecretKey as IrohSecretKey; use iroh_net::{ discovery::{ dns::DnsDiscovery, local_swarm_discovery::LocalSwarmDiscovery, pkarr::dht::DhtDiscovery, diff --git a/core/src/api/cloud/devices.rs b/core/src/api/cloud/devices.rs index 64ae5e4d0..ca1a81ad6 100644 --- a/core/src/api/cloud/devices.rs +++ b/core/src/api/cloud/devices.rs @@ -1,5 +1,7 @@ use crate::api::{Ctx, R}; +use sd_core_cloud_services::QuinnConnection; + use sd_cloud_schema::{ auth::AccessToken, devices::{self, DeviceOS, HardwareModel, PubId}, @@ -8,9 +10,8 @@ use sd_cloud_schema::{ ClientRegistration, ClientRegistrationFinishParameters, ClientRegistrationFinishResult, ClientRegistrationStartResult, }, - Client, Service, SpacedriveCipherSuite, + Client, NodeId, Service, SpacedriveCipherSuite, }; -use sd_core_cloud_services::{NodeId, QuinnConnection}; use sd_crypto::{cloud::secret_key::SecretKey, CryptoRng}; use blake3::Hash; diff --git a/core/src/api/cloud/mod.rs b/core/src/api/cloud/mod.rs index d1d9e639d..bc9bd00a1 100644 --- a/core/src/api/cloud/mod.rs +++ b/core/src/api/cloud/mod.rs @@ -4,13 +4,13 @@ use crate::{ Node, }; -use sd_core_cloud_services::{CloudP2P, IrohSecretKey, KeyManager, QuinnConnection, UserResponse}; +use sd_core_cloud_services::{CloudP2P, KeyManager, QuinnConnection, UserResponse}; use sd_cloud_schema::{ auth, error::{ClientSideError, Error}, sync::groups, - users, Client, Service, + users, Client, SecretKey as IrohSecretKey, Service, }; use sd_crypto::{CryptoRng, SeedableRng}; use sd_utils::error::report_error; diff --git a/packages/client/src/core.ts b/packages/client/src/core.ts index c27e7b25c..2f3b8a17e 100644 --- a/packages/client/src/core.ts +++ b/packages/client/src/core.ts @@ -216,7 +216,7 @@ export type CloudSyncGroupBaseData = { pub_id: CloudSyncGroupPubId; latest_key_h export type CloudSyncGroupGetRequestKind = "WithDevices" | "FullData" -export type CloudSyncGroupGetResponseKind = { WithDevices: CloudSyncGroupWithLibraryAndDevices } | { FullData: CloudSyncGroup } +export type CloudSyncGroupGetResponseKind = { kind: "WithDevices"; data: CloudSyncGroupWithLibraryAndDevices } | { kind: "FullData"; data: CloudSyncGroup } export type CloudSyncGroupPubId = string