1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Root resolver for hashtree - maps human-readable keys to merkle root hashes
//!
//! This crate provides the `RootResolver` trait and implementations for different
//! backends (Nostr, DNS, HTTP, local storage, etc.)
//!
//! # Overview
//!
//! A root resolver maps mutable human-readable keys to immutable content-addressed
//! merkle root hashes. This allows updating what content a key points to while
//! keeping the underlying data immutable.
//!
//! Key format is implementation-specific:
//! - Nostr: "npub1.../treename"
//! - DNS: "example.com/treename"
//! - Local: "local/mydata"
//!
//! # Example
//!
//! ```rust,ignore
//! use hashtree_resolver::{RootResolver, ResolverEntry};
//!
//! async fn example(resolver: impl RootResolver) {
//! // One-shot resolve
//! if let Some(cid) = resolver.resolve("npub1.../mydata").await.unwrap() {
//! println!("Found cid: {}", cid);
//! }
//!
//! // Subscribe to updates (returns a channel receiver)
//! let mut rx = resolver.subscribe("npub1.../mydata").await.unwrap();
//! while let Some(cid) = rx.recv().await {
//! println!("Updated cid: {:?}", cid);
//! }
//! }
//! ```
pub use *;
// Re-export nostr-sdk types for use in NostrResolverConfig
pub use ;