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)
| 162 | /// type. The round trip through serde is lossless for an already-constructed |
| 163 | /// node (all fields are symmetric), so `from_value` cannot fail. |
| 164 | pub fn attest(node: CanonicalNode, identity: &Identity, keypair: &KeyPair) -> CanonicalNode { |
| 165 | let value = attest_value(node.to_value(), identity, keypair); |
| 166 | serde_json::from_value(value).expect("attested intent re-deserializes") |
| 167 | } |
| 168 | |
| 169 | /// Verify an attested Intent node — thin wrapper over [`verify_value`]. |
| 170 | pub fn verify(node: &CanonicalNode, public_key: &PublicKey) -> Result<()> { |