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

Function provenance_export

atomic-cli/src/commands/rpc.rs:5075–5085  ·  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

5073/// is a client-side config read) with the SAME canonical functions.
5074/// `Ok(None)` = outside a repository (the not-a-repository fallthrough).
5075pub(crate) fn provenance_export(
5076 target: &str,
5077 person_did: &str,
5078) -> CliResult<Option<(Merkle, Vec<ProvenanceWireGraph>)>> {
5079 let Some(session) = Service::open()? else {
5080 return Ok(None);
5081 };
5082 Ok(Some(provenance_export_with_session(
5083 &session, target, person_did,
5084 )?))
5085}
5086
5087fn provenance_export_with_session(
5088 session: &Service,

Callers 1

runMethod · 0.85

Calls 2

openFunction · 0.50

Tested by

no test coverage detected