Skip to content

Commit

Permalink
chore: update ObjectStoreClient
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Jan 21, 2025
1 parent 5267c84 commit a0da5a7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
23 changes: 12 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
1 change: 1 addition & 0 deletions src/ic_object_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
4 changes: 2 additions & 2 deletions src/ic_object_store/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,7 +18,7 @@ pub async fn build_agent(host: &str, identity: Arc<dyn Identity>) -> Result<Agen
let agent = Agent::builder()
.with_url(host)
.with_arc_identity(identity)
.with_verify_query_signatures(true)
.with_verify_query_signatures(false)
.build()
.map_err(format_error)?;
if host.starts_with("http://") {
Expand Down
4 changes: 4 additions & 0 deletions src/ic_object_store/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ impl ObjectStoreClient {
pub fn new(client: Arc<Client>) -> ObjectStoreClient {
ObjectStoreClient { client }
}

pub async fn get_state(&self) -> Result<StateInfo, String> {
self.client.get_state().await
}
}

impl std::fmt::Display for ObjectStoreClient {
Expand Down

0 comments on commit a0da5a7

Please sign in to comment.