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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! # solid-pod-rs-nostr
//!
//! `did:nostr` DID documents, WebID ↔ did:nostr resolver, and an
//! embedded Nostr relay (NIP-01, NIP-11, NIP-16) for solid-pod-rs.
//!
//! This sibling crate rounds out the Solid / Nostr bridge introduced in
//! the library core:
//!
//! - The core [`solid_pod_rs::auth::nip98`] verifies NIP-98 HTTP auth
//! signatures.
//! - The core [`solid_pod_rs::interop::did_nostr`] (feature `did-nostr`)
//! ships a low-level Tier-1 DID Doc renderer and a TTL-cached WebID
//! resolver for server-side lookup of outside pubkeys.
//! - **This crate** adds the full operator surface: Tier-3 DID Docs
//! with `alsoKnownAs` + service entries, bidirectional
//! WebID ↔ did:nostr resolution (including HTML JSON-LD islands and
//! Turtle fallback), and a self-contained NIP-01/11/16 relay with a
//! pluggable event store and a `tokio-tungstenite` WebSocket wire
//! handler.
//!
//! PARITY-CHECKLIST targets: rows 89, 90, 101, 132.
//!
//! ## Module layout
//!
//! - [`did`] — `did:nostr` URIs + Tier 1 / Tier 3 document renderers.
//! - [`resolver`] — bidirectional `did:nostr` ↔ WebID resolver with SSRF guard.
//! - [`relay`] — NIP-01 event envelope, filter matching, replaceable-event
//! semantics (NIP-16), broadcast-channel live dispatch, NIP-11
//! relay-info document.
//! - [`ws`] — WebSocket wire protocol on top of `tokio-tungstenite`.
//! - [`error`] — error types for each domain.
//!
//! ## Quick-start
//!
//! ```no_run
//! use std::sync::Arc;
//! use solid_pod_rs_nostr::{
//! NostrPubkey, render_did_document_tier1, well_known_path, Relay,
//! };
//!
//! // DID Document publication.
//! let pk = NostrPubkey::from_hex(
//! "1111111111111111111111111111111111111111111111111111111111111111",
//! )
//! .unwrap();
//! let doc = render_did_document_tier1(&pk);
//! let path = well_known_path(&pk); // "/.well-known/did/nostr/…json"
//! let _ = (doc, path);
//!
//! // Relay.
//! let relay = Arc::new(Relay::in_memory());
//! let _info = relay.info().clone(); // serve at GET / (Accept: application/nostr+json)
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;