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

Method get_key

sdk/python/src/dstack_sdk/dstack_client.py:395–409  ·  view source on GitHub ↗

Derive a key from the given path, purpose, and algorithm.

(
        self,
        path: str | None = None,
        purpose: str | None = None,
        algorithm: str = "secp256k1",
    )

Source from the content-addressed store, hash-verified

393 )
394
395 async def get_key(
396 self,
397 path: str | None = None,
398 purpose: str | None = None,
399 algorithm: str = "secp256k1",
400 ) -> GetKeyResponse:
401 """Derive a key from the given path, purpose, and algorithm."""
402 await self._ensure_algorithm_supported(algorithm)
403 data: Dict[str, Any] = {
404 "path": path or "",
405 "purpose": purpose or "",
406 "algorithm": algorithm,
407 }
408 result = await self._send_rpc_request("GetKey", data)
409 return GetKeyResponse(**result)
410
411 async def get_quote(
412 self,

Calls 3

_send_rpc_requestMethod · 0.95
GetKeyResponseClass · 0.70