Compute a single row using an explicit verifier keypair (no global store). Reads the row's kind tag from the manifest, exactly as `build_rows` does.
(repo: &Repository, id: &str, kp: Option<&KeyPair>)
| 443 | /// Compute a single row using an explicit verifier keypair (no global store). |
| 444 | /// Reads the row's kind tag from the manifest, exactly as `build_rows` does. |
| 445 | fn row_for(repo: &Repository, id: &str, kp: Option<&KeyPair>) -> Row { |
| 446 | let verifier = kp.map(|kp| Verifier { |
| 447 | did: did_for_public_key(&kp.public), |
| 448 | public_key: kp.public.clone(), |
| 449 | }); |
| 450 | let info = repo |
| 451 | .vault_intent_list(None) |
| 452 | .unwrap() |
| 453 | .into_iter() |
| 454 | .find(|i| i.id == id) |
| 455 | .unwrap(); |
| 456 | let kind = repo |
| 457 | .vault_manifest() |
| 458 | .unwrap() |
| 459 | .intents |
| 460 | .get(id) |
| 461 | .map(|s| s.kind.clone()) |
| 462 | .unwrap_or_else(|| "feature".to_string()); |
| 463 | compute_row(repo, &info, kind, verifier.as_ref()) |
| 464 | } |
| 465 | |
| 466 | /// Create a review intent (kind mirrored into the manifest summary), returning |
| 467 | /// its human key. |