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

Method get_key

sdk/rust/src/dstack_client.rs:129–143  ·  view source on GitHub ↗
(
        &self,
        path: Option<String>,
        purpose: Option<String>,
    )

Source from the content-addressed store, hash-verified

127 }
128
129 pub async fn get_key(
130 &self,
131 path: Option<String>,
132 purpose: Option<String>,
133 ) -> Result<GetKeyResponse> {
134 let data = json!({
135 "path": path.unwrap_or_default(),
136 "purpose": purpose.unwrap_or_default(),
137 "algorithm": "secp256k1", // Default or specify as needed
138 });
139 let response = self.send_rpc_request("/GetKey", &data).await?;
140 let response = serde_json::from_value::<GetKeyResponse>(response)?;
141
142 Ok(response)
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 {

Callers 4

test_async_to_keypairFunction · 0.45
mainFunction · 0.45

Calls 1

send_rpc_requestMethod · 0.45

Tested by 3

test_async_to_keypairFunction · 0.36