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

Function lift_and_attest

atomic-canonical/src/lib.rs:65–73  ·  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

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.
65pub 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.
76pub fn verify(

Calls 2

lift_intentFunction · 0.85
attestFunction · 0.85