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

Method info

sdk/rust/src/tappd_client.rs:170–193  ·  view source on GitHub ↗

Retrieves information about the Tappd instance

(&self)

Source from the content-addressed store, hash-verified

168
169 /// Retrieves information about the Tappd instance
170 pub async fn info(&self) -> Result<TappdInfoResponse> {
171 #[derive(Deserialize)]
172 struct RawInfoResponse {
173 app_id: String,
174 instance_id: String,
175 app_cert: String,
176 tcb_info: String,
177 app_name: String,
178 }
179
180 let raw_response: RawInfoResponse = self
181 .send_rpc_request("/prpc/Tappd.Info", &json!({}))
182 .await?;
183
184 let tcb_info: TappdTcbInfo = serde_json::from_str(&raw_response.tcb_info)?;
185
186 Ok(TappdInfoResponse {
187 app_id: raw_response.app_id,
188 instance_id: raw_response.instance_id,
189 app_cert: raw_response.app_cert,
190 tcb_info,
191 app_name: raw_response.app_name,
192 })
193 }
194}

Callers 4

test_infoFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 1

send_rpc_requestMethod · 0.45

Tested by 2

test_infoFunction · 0.36