Request an attestation quote for the provided report data.
(
self,
report_data: str | bytes,
)
| 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, |