MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / row_for

Function row_for

atomic-cli/src/commands/intent/list.rs:366–378  ·  view source on GitHub ↗

Compute a single row using an explicit verifier keypair (no global store).

(repo: &Repository, id: &str, kp: Option<&KeyPair>)

Source from the content-addressed store, hash-verified

364
365 /// Compute a single row using an explicit verifier keypair (no global store).
366 fn row_for(repo: &Repository, id: &str, kp: Option<&KeyPair>) -> Row {
367 let verifier = kp.map(|kp| Verifier {
368 did: did_for_public_key(&kp.public),
369 public_key: kp.public.clone(),
370 });
371 let info = repo
372 .vault_intent_list(None)
373 .unwrap()
374 .into_iter()
375 .find(|i| i.id == id)
376 .unwrap();
377 compute_row(repo, &info, verifier.as_ref())
378 }
379
380 #[test]
381 fn unattested_row_is_na_na() {

Callers 6

unattested_row_is_na_naFunction · 0.70
stale_is_stale_and_naFunction · 0.70
other_signer_is_na_not_xFunction · 0.70

Calls 7

did_for_public_keyFunction · 0.85
vault_intent_listMethod · 0.80
as_refMethod · 0.80
compute_rowFunction · 0.70
cloneMethod · 0.45
unwrapMethod · 0.45
into_iterMethod · 0.45

Tested by 6

unattested_row_is_na_naFunction · 0.56
stale_is_stale_and_naFunction · 0.56
other_signer_is_na_not_xFunction · 0.56