MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / attest

Method attest

sdk/rust/src/dstack_client.rs:157–167  ·  view source on GitHub ↗
(&self, report_data: Vec<u8>)

Source from the content-addressed store, hash-verified

155 }
156
157 pub async fn attest(&self, report_data: Vec<u8>) -> Result<AttestResponse> {
158 if report_data.is_empty() || report_data.len() > 64 {
159 anyhow::bail!("Invalid report data length")
160 }
161 let hex_data = hex_encode(report_data);
162 let data = json!({ "report_data": hex_data });
163 let response = self.send_rpc_request("/Attest", &data).await?;
164 let response = serde_json::from_value::<AttestResponse>(response)?;
165
166 Ok(response)
167 }
168
169 pub async fn info(&self) -> Result<InfoResponse> {
170 let response = self.send_rpc_request("/Info", &json!({})).await?;

Callers 2

app_attestFunction · 0.45
test_async_client_attestFunction · 0.45

Calls 3

is_emptyMethod · 0.45
lenMethod · 0.45
send_rpc_requestMethod · 0.45

Tested by 1

test_async_client_attestFunction · 0.36