host-chain-core 0.3.11

WASM-compatible DotNS resolution, IPFS fetching, and CAR parsing (async, reqwest + ruzstd)
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Chain database persistence abstraction.
//!
//! Native uses the filesystem; WASM uses browser localStorage.

/// Persistence backend for chain databases (smoldot fast restart).
pub trait ChainStore {
    /// Load persisted chain database content. Returns empty string if not found.
    fn load(&self, key: &str) -> String;
    /// Save chain database content.
    fn save(&self, key: &str, data: &str);
}