!! 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.
Does this apply to all of ERC-721, ERC-1155, ERC-20 formats? Currently, token standards will define the depth to which a token is defined -- in the case of the ERC-20, there is no identifier within the contract, the contract represents the token and maintains ownership. However, in the case of ERC-721 and ERC-1155, you could have contract + tokenId as defined above. I'm unsure if there are further levels of depth or alternative definitions yet.
Also, a somewhat related note, in reference to the ERC-1155 standard, there is an expectation of the token's ID within a generalized URI, which may impact how the URN routes to a generalized URI for an ERC-1155 token. Notably, in the ERC-1155 Metadata URI standard, the token ID is left-padded with 0s and 0x stripped from the front (which I'm not confident is a good practice, but this was the decision taken during the 1155 standard development, and wanted to share) -- https://eips.ethereum.org/EIPS/eip-1155#metadata