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

Function provenance_export

atomic-cli/src/commands/rpc.rs:5035–5045  ·  view source on GitHub ↗

`atomic provenance trace/show ` over ExportProvenance — the handler resolves the target (URN/prefix/hash), loads the explaining graphs (newest first), maps each to the projection input, and pre-walks the prior-turn chain; the CLI projects (and signs — the identity store is a client-side config read) with the SAME canonical functions. `Ok(None)` = outside a repository (the not-a-repository

(
    target: &str,
    person_did: &str,
)

Source from the content-addressed store, hash-verified

5033/// is a client-side config read) with the SAME canonical functions.
5034/// `Ok(None)` = outside a repository (the not-a-repository fallthrough).
5035pub(crate) fn provenance_export(
5036 target: &str,
5037 person_did: &str,
5038) -> CliResult<Option<(Merkle, Vec<ProvenanceWireGraph>)>> {
5039 let Some(session) = Service::open()? else {
5040 return Ok(None);
5041 };
5042 Ok(Some(provenance_export_with_session(
5043 &session, target, person_did,
5044 )?))
5045}
5046
5047fn provenance_export_with_session(
5048 session: &Service,

Callers 1

runMethod · 0.85

Calls 2

openFunction · 0.85

Tested by

no test coverage detected