Spaces and Namespaces
ElastOS Runtime uses a unified addressing scheme where apps request resources by URI and the matching provider capsule handles them. The app doesn't know or care where data physically lives. For the conceptual overview, see Architecture.
localhost:// Paths
Everything on your machine is addressed through localhost:// paths. The runtime mediates all access through the capability system.
| Path | Purpose |
|---|---|
localhost://storage/{path} | File storage |
localhost://service/media/* | Media services |
localhost://MyWebSite | Staged local sites |
elastos:// Paths
Content that leaves your machine and enters the network is addressed through elastos://:
| Path | Purpose |
|---|---|
elastos://cid/{hash} | Content-addressed files |
elastos://peer/{wallet}/Public/* | Peer public content |
elastos://ai/ | AI model provider contract |
PC2 v1 to v2 URI Mapping
As PC2 converges with the runtime, existing API paths map to the new namespace:
| PC2 v1 Path | Runtime v2 URI |
|---|---|
/file?uid=... | localhost://storage/{path} |
/ipfs/:cid | elastos://cid/{hash} |
/public/:wallet/* | elastos://peer/{wallet}/Public/* |
/api/media/* | localhost://service/media/* |
This mapping is documented in NAMESPACE_MAPPING.md in the runtime repository.
How Provider Capsules Handle URIs
When a capsule requests a resource by URI, the runtime routes the request to the appropriate provider capsule:
- The requesting capsule presents its capability token and the resource URI
- The runtime validates the token (12-step validation)
- The runtime matches the URI to the responsible provider capsule
- The provider capsule fulfills the request
- The response is returned to the requesting capsule
The requesting capsule never interacts with the provider directly. The runtime mediates every step, enforcing capability tokens at each boundary.