Skip to main content

Module uri

Module uri 

Source
Expand description

decdn: URIs (#2449): one string names a blob, a whole bundle, or one file inside a bundle, with an optional namespace routing hint.

decdn:<hash>[/<path>][?ns=<id>]
URINames
decdn:<hash>the raw blob
decdn:<hash>/the whole bundle whose manifest has this hash
decdn:<hash>/a/b.txtone entry of that bundle
any of the above with ?ns=42the same, with the namespace routing hint
  • <hash> is 64 hex characters, bare: no b3: or 0x prefix. Parsing accepts uppercase and DecdnUri’s Display writes lowercase.
  • The URI has no // authority part, like magnet: and urn:.
  • A trailing / marks a bundle. The URI author knows whether they published one, so the client never inspects content to decide.
  • <path> is the manifest entry’s relative POSIX path, each segment percent-encoded as an RFC 3986 pchar. It names exactly one manifest path, literally.
  • ns is the namespace id in decimal (ADR 002), never 0. It is a routing hint, not part of the identity, so it sits in the query.
  • Any other query key is an error.

The URI is client-side syntax only: it resolves to what the wire already carries, a BLAKE3 hash plus the namespace_id hint.

Structs§

DecdnUri
A parsed decdn: URI. Display writes its canonical form, which parses back to an equal value.

Enums§

UriError
Why a string is not a decdn: URI.
UriTarget
What a DecdnUri’s hash names.

Constants§

SCHEME
The scheme prefix every decdn: URI starts with.