(&self)
| 92 | |
| 93 | impl LookupKey { |
| 94 | async fn execute(&self) -> CliResult<()> { |
| 95 | let canonical = self.normalize_and_validate()?; |
| 96 | |
| 97 | let client = build_apex_client(self.server.as_deref()).await?; |
| 98 | |
| 99 | let info = client |
| 100 | .resolve_identity_by_public_key(&canonical) |
| 101 | .await |
| 102 | .map_err(|e| self.map_remote_error(e, &canonical))?; |
| 103 | |
| 104 | let expected_did = did_atomic(&canonical); |
| 105 | |
| 106 | match self.format.to_lowercase().as_str() { |
| 107 | "json" => self.output_json(&info, &canonical, &expected_did), |
| 108 | _ => self.output_default(&info, &canonical, &expected_did), |
| 109 | } |
| 110 | |
| 111 | Ok(()) |
| 112 | } |
| 113 | |
| 114 | /// Normalize user input (case, optional prefixes) and validate it as a |
| 115 | /// base32-encoded Ed25519 public key. |
no test coverage detected