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

Function lift_and_attest_memory

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

Lift an authored memory (frontmatter + body) into a canonical node, attest it (hash + sign) with the given identity, and return the node. Mirrors [`lift_and_attest`] and signs through the same single path. The node is not* gated here — call [`validate_memory`] to gate it.

(
    frontmatter: &Map<String, Value>,
    body: &str,
    identity: &Identity,
    keypair: &KeyPair,
)

Source from the content-addressed store, hash-verified

80/// [`lift_and_attest`] and signs through the same single path. The node is
81/// *not* gated here — call [`validate_memory`] to gate it.
82pub fn lift_and_attest_memory(
83 frontmatter: &Map<String, Value>,
84 body: &str,
85 identity: &Identity,
86 keypair: &KeyPair,
87) -> Result<MemoryNode> {
88 let node = memory::lift_memory(frontmatter, body)?;
89 Ok(proof::attest_memory(node, identity, keypair))
90}
91
92/// Verify an attested memory's content hash and signature against a public key.
93pub fn verify_memory(

Calls 2

lift_memoryFunction · 0.85
attest_memoryFunction · 0.85