(&self, report_data: Vec<u8>)
| 143 | } |
| 144 | |
| 145 | pub async fn get_quote(&self, report_data: Vec<u8>) -> Result<GetQuoteResponse> { |
| 146 | if report_data.is_empty() || report_data.len() > 64 { |
| 147 | anyhow::bail!("Invalid report data length") |
| 148 | } |
| 149 | let hex_data = hex_encode(report_data); |
| 150 | let data = json!({ "report_data": hex_data }); |
| 151 | let response = self.send_rpc_request("/GetQuote", &data).await?; |
| 152 | let response = serde_json::from_value::<GetQuoteResponse>(response)?; |
| 153 | |
| 154 | Ok(response) |
| 155 | } |
| 156 | |
| 157 | pub async fn attest(&self, report_data: Vec<u8>) -> Result<AttestResponse> { |
| 158 | if report_data.is_empty() || report_data.len() > 64 { |
nothing calls this directly
no test coverage detected