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)
| 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. |
| 190 | pub 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 |
no test coverage detected