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

Method sign

sdk/rust/src/dstack_client.rs:202–210  ·  view source on GitHub ↗

Signs a payload using a derived key.

(&self, algorithm: &str, data: Vec<u8>)

Source from the content-addressed store, hash-verified

200
201 /// Signs a payload using a derived key.
202 pub async fn sign(&self, algorithm: &str, data: Vec<u8>) -> Result<SignResponse> {
203 let payload = SignRequest {
204 algorithm,
205 data: hex_encode(data),
206 };
207 let response = self.send_rpc_request("/Sign", &payload).await?;
208 let response = serde_json::from_value::<SignResponse>(response)?;
209 Ok(response)
210 }
211
212 /// Verifies a payload signature.
213 pub async fn verify(

Calls 1

send_rpc_requestMethod · 0.45