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

Function attest_report

atomic-cli/src/commands/triage/output.rs:172–176  ·  view source on GitHub ↗

Sign the report into an attested, frozen JSON artifact. Serializes the report to a JSON object, resolves the person's signing identity + keypair (the same path `provenance show --sign` uses), and attaches an Ed25519 Data Integrity proof via the shared `eddsa-jcs-2022` signer. The returned value is the report Value plus `attributedTo`, `contentHash`, and `proof` — verifiable with [`atomic_canonica

(report: &TriageReport, identity: Option<&str>)

Source from the content-addressed store, hash-verified

170/// `contentHash`, and `proof` — verifiable with
171/// [`atomic_canonical::proof::verify_value`].
172pub fn attest_report(report: &TriageReport, identity: Option<&str>) -> CliResult<Value> {
173 let (identity, keypair) = resolve_person(identity)?;
174 let value = serde_json::to_value(report).expect("triage report serialization is infallible");
175 Ok(attest_value(value, &identity, &keypair))
176}
177
178// ── HTML skin ───────────────────────────────────────────────────────────────
179

Callers 1

runMethod · 0.85

Calls 2

resolve_personFunction · 0.85
attest_valueFunction · 0.85

Tested by

no test coverage detected