!! Migrated to https://github.com/common-metaverse/urn-namespaces !!
Identifying a blockchain asset is difficult. Wallets, exchanges, tools and other pieces of software need to know the specifics about how to interact with the project's infrastructure to get images or to render content. This proposal shows a temptative solution to the content addressing mechanisms to embed our crypto-art, assets, wearables and avatars into metaverse(s).
A Uniform Resource Name (URNs) are globally unique persistent identifiers assigned within defined namespaces so they will be available for a long period of time, even after the resource which they identify ceases to exist or becomes unavailable.
-
Agree on a URN schema to identify any assets. URN are composed of three main elements: Header (
urn:
), A namespace, and an NSS (namespace-specific string) forming a string in the shapeurn:{namespace}:{nss}
.The proposal only enforces that the namespace is part of a well-known list of namespaces with mappings to APIs or docummentation on how to resolve the NSS part of the asset.
For Decentraland, we are evaluating the format
urn:decentraland:{chain-identifier}:{contract}:{tokenid}
which will fulfill all of our current use cases.In any case, after the NSS string, a query string component is a valid part of any URN, making extensions not only possible but very easy to parse and implement. Some examples of our implementation could be:
urn:decentraland:matic:0x000000000123123:0x332 urn:thesandbox:ethereum:LAND:0x1010 urn:cryptovoxels:ethereum:COLR:0x1 urn:decentraland:ethereum:LAND:0x1010?atBlock=1231411231 urn:decentraland:matic:quests:1
- Identify assets using
urn:{metaverse-namespace}:{custom-string}
. {custom-string}
is a namespace-specific string, hierarchically separating the parts of the custom-string with colon:
is recommended and friendlyer than/
for URL encoding (urn:decentraland:ethereum:LAND:0x1
instead ofurn:decentraland:ethereum/LAND/0x1
).
- Identify assets using
-
Create a Github organization to track the ownership of the urn:namespaces (pull requests) and potentially point to the documentation on how to resolve the assets based on specific URNs
- Wallets and service providers like exchanges could start indexing assets unequivocally using a common ID.
- By documenting namespaces and its content resolution, tool developers would have a lower entry barrier fostering innovation of the ecosystem and the rise of the metaverse.
- Take an initial step to portability and interoperability of assets across the metaverse.
- URN are designed to last forever. Completely decoupled from URL and servers.
TL;DR: every ERC-721 and potentially most of ERC-1155 (following the EIP) could be addressed using this mechanism.
The idea behind this proposal is to formalize some namespaces for the URN and to define for each one of them: a content resolution mechanism.
As an example, to handle every LAND (ERC-721) we would specify a list of routing mechanisms, like web server routes:
urn:decentraland:ethereum:LAND:{tokenId}
will resolve tohttps://api.decentraland.org/land/{tokenId}.json
urn:thesandbox:ethereum:LAND:{tokenId}
will resolve tohttps://api.sandbox.game/land/{tokenId}.json
urn:thesandbox:ropsten:LAND:{tokenId}
will resolve tohttps://staging-api.decentraland.org/land/{tokenId}.json
And it will be open to extensions, for instance. We (at decentraland) are thinking about including the default wearables (not blockchain) as part of this schema. That is so, to use the same URN for the initial setup of the avatars without hacks, and the backpack will have a clean implementation with only URNs.
urn:decentraland:basic-wearables:{collection}:{assetId}
will resolve tohttps://wearables-api.decentraland.org/{collection}/{assetId}.json