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

Method get_quote

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

Source from the content-addressed store, hash-verified

143 }
144
145 pub async fn get_quote(&self, report_data: Vec<u8>) -> Result<GetQuoteResponse> {
146 if report_data.is_empty() || report_data.len() > 64 {
147 anyhow::bail!("Invalid report data length")
148 }
149 let hex_data = hex_encode(report_data);
150 let data = json!({ "report_data": hex_data });
151 let response = self.send_rpc_request("/GetQuote", &data).await?;
152 let response = serde_json::from_value::<GetQuoteResponse>(response)?;
153
154 Ok(response)
155 }
156
157 pub async fn attest(&self, report_data: Vec<u8>) -> Result<AttestResponse> {
158 if report_data.is_empty() || report_data.len() > 64 {

Callers

nothing calls this directly

Calls 3

is_emptyMethod · 0.45
lenMethod · 0.45
send_rpc_requestMethod · 0.45

Tested by

no test coverage detected