#include "InMemoryBackend.h" #include namespace nt { std::string InMemoryBackend::Put(std::vector value) { const std::string hash = picosha2::hash256_hex_string(value.begin(), value.end()); kv_.emplace(hash, std::move(value)); return hash; } std::optional> InMemoryBackend::Get(const std::string& hash) { auto it = kv_.find(hash); if (it == kv_.end()) return std::nullopt; return it->second; } } // namespace nt