substrate/uri/mod.rs
1//! CMN URI parsing and URL policy utilities.
2//!
3//! The `cmn://` scheme follows the generic URI syntax defined in
4//! [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986):
5//!
6//! ```text
7//! cmn://domain
8//! cmn://domain/hash
9//! cmn://domain/mycelium/hash
10//! cmn://domain/taste/hash
11//! ```
12//!
13//! Four forms:
14//! - `cmn://example.com` — domain root
15//! - `cmn://example.com/b3.3yMR7vZQ9hL...` — content-addressed spore
16//! - `cmn://example.com/mycelium/b3.7tRk...` — content-addressed mycelium
17//! - `cmn://example.com/taste/b3.7tRk...` — content-addressed taste report
18
19mod cmn;
20mod domain;
21mod url;
22
23pub use cmn::{
24 build_domain_uri, build_mycelium_uri, build_spore_uri, build_taste_uri,
25 normalize_taste_target_uri, parse_uri, CmnUri, CmnUriKind,
26};
27pub use domain::{cmn_entry_url, validate_domain};
28pub use url::{is_public_ip, normalize_and_validate_url};