diff --git a/Cargo.lock b/Cargo.lock index 1999c57..d7ad2e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1943,7 +1943,7 @@ dependencies = [ [[package]] name = "ic_cose" -version = "0.6.7" +version = "0.6.8" dependencies = [ "async-trait", "candid", @@ -1956,7 +1956,7 @@ dependencies = [ [[package]] name = "ic_cose_canister" -version = "0.6.7" +version = "0.6.8" dependencies = [ "candid", "ciborium", @@ -1977,7 +1977,7 @@ dependencies = [ [[package]] name = "ic_cose_types" -version = "0.6.7" +version = "0.6.8" dependencies = [ "aes-gcm", "candid", @@ -2001,13 +2001,14 @@ dependencies = [ [[package]] name = "ic_object_store" -version = "0.6.7" +version = "0.6.8" dependencies = [ "aes-gcm", "async-trait", "bytes", "candid", "chrono", + "const-hex", "ed25519-consensus", "futures", "ic-agent", @@ -2020,7 +2021,7 @@ dependencies = [ [[package]] name = "ic_object_store_canister" -version = "0.6.7" +version = "0.6.8" dependencies = [ "candid", "ciborium", @@ -2247,9 +2248,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "itertools" @@ -3107,9 +3108,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" @@ -3152,9 +3153,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.135" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" +checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" dependencies = [ "itoa", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 95e80b9..2aac03a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ strip = true opt-level = 's' [workspace.package] -version = "0.6.7" +version = "0.6.8" edition = "2021" repository = "https://github.com/ldclabs/ic-cose" keywords = ["config", "cbor", "canister", "icp", "encryption"] diff --git a/src/ic_object_store/Cargo.toml b/src/ic_object_store/Cargo.toml index f5ee5eb..ec37458 100644 --- a/src/ic_object_store/Cargo.toml +++ b/src/ic_object_store/Cargo.toml @@ -25,3 +25,4 @@ ic_cose_types = { path = "../ic_cose_types", version = "0.6" } [dev-dependencies] tokio = { workspace = true } ed25519-consensus = { workspace = true } +const-hex = { workspace = true } diff --git a/src/ic_object_store/src/agent.rs b/src/ic_object_store/src/agent.rs index 548cec0..ed672f5 100644 --- a/src/ic_object_store/src/agent.rs +++ b/src/ic_object_store/src/agent.rs @@ -5,7 +5,7 @@ use std::sync::Arc; /// Creates and configures an IC agent with the given host URL and identity. /// /// # Arguments -/// * `host` - The IC host URL (e.g., "https://ic0.app" or "http://localhost:8000") +/// * `host` - The IC host URL (e.g., "https://ic0.app" or "http://localhost:4943") /// * `identity` - Arc-wrapped identity for authentication /// /// # Returns @@ -18,7 +18,7 @@ pub async fn build_agent(host: &str, identity: Arc) -> Result) -> ObjectStoreClient { ObjectStoreClient { client } } + + pub async fn get_state(&self) -> Result { + self.client.get_state().await + } } impl std::fmt::Display for ObjectStoreClient {