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

Function lift_and_attest_memory

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

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

Calls 2

lift_memoryFunction · 0.85
attest_memoryFunction · 0.85