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>)
| 650 | /// Compute a single row using an explicit verifier keypair (no global store). |
| 651 | /// Reads the row's kind tag from the manifest, exactly as `build_rows` does. |
| 652 | fn row_for(repo: &Repository, id: &str, kp: Option<&KeyPair>) -> Row { |
| 653 | let verifier = kp.map(|kp| Verifier { |
| 654 | did: did_for_public_key(&kp.public), |
| 655 | public_key: kp.public.clone(), |
| 656 | }); |
| 657 | let info = repo |
| 658 | .vault_intent_list(None) |
| 659 | .unwrap() |
| 660 | .into_iter() |
| 661 | .find(|i| i.id == id) |
| 662 | .unwrap(); |
| 663 | let kind = repo |
| 664 | .vault_manifest() |
| 665 | .unwrap() |
| 666 | .intents |
| 667 | .get(id) |
| 668 | .map(|s| s.kind.clone()) |
| 669 | .unwrap_or_else(|| "feature".to_string()); |
| 670 | compute_row(repo, &info, kind, verifier.as_ref()) |
| 671 | } |
| 672 | |
| 673 | /// Create a review intent (kind mirrored into the manifest summary), returning |
| 674 | /// its human key. |