Skip to content

Commit

Permalink
chore(sdk): update network-v2 proto (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Nov 5, 2024
1 parent 30b3653 commit cafdbfc
Show file tree
Hide file tree
Showing 3 changed files with 293 additions and 37 deletions.
14 changes: 8 additions & 6 deletions crates/sdk/src/network-v2/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ impl NetworkClient {

// Check if the URL scheme is HTTPS and configure TLS.
if rpc_url.starts_with("https://") {
println!("Using TLS");
let tls_config = ClientTlsConfig::new().with_enabled_roots();
endpoint = endpoint.tls_config(tls_config)?;
}
Expand All @@ -75,7 +74,6 @@ impl NetworkClient {

// Check if the URL scheme is HTTPS and configure TLS.
if rpc_url.starts_with("https://") {
println!("Using TLS");
let tls_config = ClientTlsConfig::new().with_enabled_roots();
endpoint = endpoint.tls_config(tls_config)?;
}
Expand Down Expand Up @@ -124,14 +122,18 @@ impl NetworkClient {
/// Get all the proof requests for a given status. Also filter by version if provided.
pub async fn get_filtered_proof_requests(
&self,
status: ProofStatus,
version: Option<&str>,
version: Option<String>,
proof_status: Option<i32>,
execution_status: Option<i32>,
limit: Option<u32>,
) -> Result<GetFilteredProofRequestsResponse> {
let mut rpc = self.get_rpc().await?;
let res = rpc
.get_filtered_proof_requests(GetFilteredProofRequestsRequest {
status: status.into(),
version: version.map(|v| v.to_string()).unwrap_or_default(),
version,
proof_status,
execution_status,
limit,
})
.await?
.into_inner();
Expand Down
4 changes: 2 additions & 2 deletions crates/sdk/src/network-v2/proto/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub mod artifact_store_client {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// / Creates an artifact that can be used for proof requests.
/// Creates an artifact that can be used for proof requests.
pub async fn create_artifact(
&mut self,
request: impl tonic::IntoRequest<super::CreateArtifactRequest>,
Expand Down Expand Up @@ -127,7 +127,7 @@ pub mod artifact_store_server {
/// Generated trait containing gRPC methods that should be implemented for use with ArtifactStoreServer.
#[async_trait]
pub trait ArtifactStore: std::marker::Send + std::marker::Sync + 'static {
/// / Creates an artifact that can be used for proof requests.
/// Creates an artifact that can be used for proof requests.
async fn create_artifact(
&self,
request: tonic::Request<super::CreateArtifactRequest>,
Expand Down
Loading

0 comments on commit cafdbfc

Please sign in to comment.