Produce a fully attested Intent node — a thin wrapper over [`attest_value`] so hash and signature can never drift from any other node type. The round trip through serde is lossless for an already-constructed node (all fields are symmetric), so `from_value` cannot fail.
(node: CanonicalNode, identity: &Identity, keypair: &KeyPair)
| 213 | /// type. The round trip through serde is lossless for an already-constructed |
| 214 | /// node (all fields are symmetric), so `from_value` cannot fail. |
| 215 | pub fn attest(node: CanonicalNode, identity: &Identity, keypair: &KeyPair) -> CanonicalNode { |
| 216 | let value = attest_value(node.to_value(), identity, keypair); |
| 217 | serde_json::from_value(value).expect("attested intent re-deserializes") |
| 218 | } |
| 219 | |
| 220 | /// Verify an attested Intent node — thin wrapper over [`verify_value`]. |
| 221 | pub fn verify(node: &CanonicalNode, public_key: &PublicKey) -> Result<()> { |