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

Function lift_and_attest

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

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

Calls 2

lift_intentFunction · 0.85
attestFunction · 0.85