Sends a raw quote request with 64 bytes of report data
(&self, report_data: Vec<u8>)
| 152 | |
| 153 | /// Sends a raw quote request with 64 bytes of report data |
| 154 | pub async fn get_quote(&self, report_data: Vec<u8>) -> Result<TdxQuoteResponse> { |
| 155 | if report_data.len() != 64 { |
| 156 | bail!("Report data must be exactly 64 bytes for raw quote"); |
| 157 | } |
| 158 | |
| 159 | let payload = json!({ |
| 160 | "report_data": hex_encode(report_data), |
| 161 | }); |
| 162 | |
| 163 | let response = self |
| 164 | .send_rpc_request("/prpc/Tappd.RawQuote", &payload) |
| 165 | .await?; |
| 166 | Ok(response) |
| 167 | } |
| 168 | |
| 169 | /// Retrieves information about the Tappd instance |
| 170 | pub async fn info(&self) -> Result<TappdInfoResponse> { |