version 1.0
APPROVED
The WRAP URI standard allows developers to reference a wrapper through simple strings, much like referencing a website using an HTTP URI string.
The W3C has published existing URI standards, which we'll be leveraging to create the WRAP URI Standard.
Based on the available "URI syntax components", all WRAP URIs must have the following required components:
Note: If you're using a WRAP client, the scheme may be prepended by default.
The wrap://
scheme is used to indicate a WRAP URI. Similar to http://
, this let's developers know that they must use a compatible WRAP client to resolve the provided URI. The resolution process is detailed in the WRAP URI Resolution Standard.
WRAP URI authorities can be any UTF-8 string, with some constraints applied to termination.
The authority component is preceded by a double slash ("//") and is terminated by the next slash ("/").
WRAP URI path is simply defined as everything that comes after the authority's terminating slash.
The path URI is only useful given the context provided by the authority. The format and encoding of the path URI is dependent on the authority to which it belongs.
wrap://ens/my.wrapper.eth
\__/ \_/ \____________/
| | |
scheme authority path
wrap://ipfs/QmXUQXwJ8eb8TjXvXJGYNGEjipKpDPUG933FTiakeD2UTE
\__/ \__/ \____________________________________________/
| | |
scheme authority path
wrap://http/wrappers.server.io/my-wrapper?version=2
\__/ \__/ \_____________________________________/
| | |
scheme authority path
wrap://file/~/path/to/wrapper/directory/
\__/ \__/ \__________________________/
| | |
scheme authority path