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

Method get_quote

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

Request an attestation quote for the provided report data.

(
        self,
        report_data: str | bytes,
    )

Source from the content-addressed store, hash-verified

409 return GetKeyResponse(**result)
410
411 async def get_quote(
412 self,
413 report_data: str | bytes,
414 ) -> GetQuoteResponse:
415 """Request an attestation quote for the provided report data."""
416 if not report_data or not isinstance(report_data, (bytes, str)):
417 raise ValueError("report_data can not be empty")
418 report_bytes: bytes = (
419 report_data.encode() if isinstance(report_data, str) else report_data
420 )
421 if len(report_bytes) > 64:
422 raise ValueError("report_data must be less than 64 bytes")
423 hex = binascii.hexlify(report_bytes).decode()
424 result = await self._send_rpc_request("GetQuote", {"report_data": hex})
425 return GetQuoteResponse(**result)
426
427 async def attest(
428 self,

Callers 5

mainFunction · 0.95
test_replay_rtmrFunction · 0.95
test_report_dataFunction · 0.95

Calls 3

_send_rpc_requestMethod · 0.95
GetQuoteResponseClass · 0.70
decodeMethod · 0.45

Tested by 5

mainFunction · 0.76
test_replay_rtmrFunction · 0.76
test_report_dataFunction · 0.76