URIs
Deployed wrappers are identified using custom URIs (Uniform Resource Identifier) called WRAP URIs. For example:
wrap://ens/api.helloworld.polywrap.eth
WRAP URIs follow the WRAP URI Standard.
WRAP URIs have 3 parts: a protocol, an authority, and a path.
Scheme
WRAP URIs use the wrap
scheme. Including wrap://
in your URI is optional in practice.
Authority
The Authority is used to denote which underlying protocol/standard the URI is part of. Usually, during URI resolution, the Polywrap Client will have at least one URI Resolver for each Authority used.
For example:
ens/
for resolving ENS domainsipfs/
for resolving IPFS contentfs/
for resolving content on the local filesystemhttp/
for resolving content via HTTP
Path
This is simply everything that comes after the Authority, and defines the unique resource we are trying to resolve.
For example:
api.domain.eth
for an ENS domainQmaLbZnnnHbcRRo3wNBQ2MhugmBGL9R2YYeBvj6Nk2QumP
for an IPFS file/directory./build
for a local directoryexample.com/my-wrapper.wasm
for a Wrap downloadable over HTTP
ens/
and ipfs/
URI resolution is supported in all Polywrap clients by default. Adding custom URI resolvers is possible. More documentation on how to do this will be released soon.