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

Function proof_signature

atomic-canonical/src/proof.rs:190–198  ·  view source on GitHub ↗

The signature a value's proof carries — what `--signed` hands to the recording service after a key holder signed `--prepare`'s bytes elsewhere.

(value: &Value)

Source from the content-addressed store, hash-verified

188/// The signature a value's proof carries — what `--signed` hands to the
189/// recording service after a key holder signed `--prepare`'s bytes elsewhere.
190pub fn proof_signature(value: &Value) -> Result<Signature> {
191 let proof: Proof = value
192 .as_object()
193 .and_then(|obj| obj.get(PROP_PROOF))
194 .cloned()
195 .and_then(|p| serde_json::from_value(p).ok())
196 .ok_or_else(|| CanonicalError::Proof("node carries no proof".into()))?;
197 decode_proof_value(&proof.proof_value)
198}
199
200/// Generic verify over a JSON-LD value — the same three checks as the typed
201/// path: (1) the content hash recomputes over `hashing_view`, (2) the signature

Callers 2

intent_attestFunction · 0.85
verify_project_identityFunction · 0.85

Calls 4

ProofClass · 0.85
decode_proof_valueFunction · 0.85
getMethod · 0.65
okMethod · 0.45

Tested by

no test coverage detected