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

Function lift_and_attest_memory

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

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

Calls 2

lift_memoryFunction · 0.85
attest_memoryFunction · 0.85