Lift an authored intent (frontmatter + body) into a canonical node, attest it (hash + sign) with the given identity, and return the node. The node is *not* gated here — call [`validate_intent`] to gate it.
(
frontmatter: &Map<String, Value>,
body: &str,
identity: &Identity,
keypair: &KeyPair,
)
| 63 | /// attest it (hash + sign) with the given identity, and return the node. |
| 64 | /// The node is *not* gated here — call [`validate_intent`] to gate it. |
| 65 | pub fn lift_and_attest( |
| 66 | frontmatter: &Map<String, Value>, |
| 67 | body: &str, |
| 68 | identity: &Identity, |
| 69 | keypair: &KeyPair, |
| 70 | ) -> Result<CanonicalNode> { |
| 71 | let node = lift::lift_intent(frontmatter, body)?; |
| 72 | Ok(proof::attest(node, identity, keypair)) |
| 73 | } |
| 74 | |
| 75 | /// Verify an attested node's content hash and signature against a public key. |
| 76 | pub fn verify( |