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

Function lift_and_attest

atomic-canonical/src/lib.rs:60–68  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

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

Calls 2

lift_intentFunction · 0.85
attestFunction · 0.85