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

Function attest_memory

atomic-canonical/src/proof.rs:228–231  ·  view source on GitHub ↗

Produce a fully attested Memory node — the same thin wrapper over [`attest_value`] the Intent path uses, so both node types sign through one canonicalization path and their hashes/signatures cannot drift.

(node: MemoryNode, identity: &Identity, keypair: &KeyPair)

Source from the content-addressed store, hash-verified

226/// [`attest_value`] the Intent path uses, so both node types sign through one
227/// canonicalization path and their hashes/signatures cannot drift.
228pub fn attest_memory(node: MemoryNode, identity: &Identity, keypair: &KeyPair) -> MemoryNode {
229 let value = attest_value(node.to_value(), identity, keypair);
230 serde_json::from_value(value).expect("attested memory re-deserializes")
231}
232
233/// Verify an attested Memory node — thin wrapper over [`verify_value`].
234pub fn verify_memory(node: &MemoryNode, public_key: &PublicKey) -> Result<()> {

Callers 2

attested_memoryFunction · 0.85
lift_and_attest_memoryFunction · 0.85

Calls 2

attest_valueFunction · 0.85
to_valueMethod · 0.45

Tested by

no test coverage detected