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

Function attest_memory

atomic-canonical/src/proof.rs:177–180  ·  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

175/// [`attest_value`] the Intent path uses, so both node types sign through one
176/// canonicalization path and their hashes/signatures cannot drift.
177pub fn attest_memory(node: MemoryNode, identity: &Identity, keypair: &KeyPair) -> MemoryNode {
178 let value = attest_value(node.to_value(), identity, keypair);
179 serde_json::from_value(value).expect("attested memory re-deserializes")
180}
181
182/// Verify an attested Memory node — thin wrapper over [`verify_value`].
183pub 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