NameSys is proposing an extension to ENSIP-07 which introduces
data:uri format in ENS Contenthash field, allowing dynamic data streaming using CCIP-Read and Wildcard Resolution. ENS Contenthash so far only allows static content by linking to decentralised hosting such as IPFS, Arweave etc. This proposed improvement will further enhance ENS domains’ utility by enabling a rich ecosystem of dynamic content in the Contenthash. Please feel free to go through the draft and ask any questions, seek clarifications, give suggestions or propose edits.
PR for this proposal lives here: [Proposal] ENSIP-17: DataURI Format in Contenthash by sshmatrix · Pull Request #165 · ensdomains/docs · GitHub
This ENSIP introduces DataURI format in Contenthash field (ENSIP-07) for compatible ENS resolvers. DataURI format (RFC-2397) is desired and suitable for enabling dynamic dWeb content for ENS domains using on-chain and/or off-chain resources.
contenthash (ENSIP-07) currently enables linking to static content which is strictly off-chain. The off-chain content is entirely dependent on off-chain providers, and updating this content for ENS-based decentralised websites typically requires updating the on-chain
contenthash explicitly (except for IPNS). ENS domains’
avatar text records and their ERC-721/-1155 interfaces already support generated DataURI bytes (
data:uri) to resolve JSON and image metadata. This specification enables a similar
data:uri format in ENS
contenthash field, allowing ENS Resolvers to fetch and serve on-chain and/or off-chain data. The off-chain resources for the DataURI content may use CCIP-Read and an appropriate
utf-8 decoder to render the encoded bytes. This specification allows complete support for dynamic data in ENS Contenthash using CCIP-Read (EIP-3886) and Wildcard Resolution (ENSIP-10).
This specification is an extension of ENSIP-07 to support in-line bytes of data conforming to the
data:uri scheme (RFC-2397) as ENS Contenthash. There are no changes to be made in the current ENS Resolvers since
contenthash bytes are parsed as
utf-8 characters by default. Only a standardisation needs to be enacted for web3 providers to begin resolving ENS Contenthash in
data:uri scheme. Simple details of the proposed standardisation are as follows:
- DataURI is string-formatted according to RFC-2397:
- The raw string-formatted data is returned as encoded hexadecimal bytes. The encoded value returned by DataURI-compatible
contenthashis always prefixed with the 5-byte identifier
0x646174613afollowed by the remaining variable encoded databytes.
stringTohex("data:")` = `0x646174613a`
|Decoded String||Encoded Bytes|
With this simple standardisation, web3 providers may now serve
data:uri content from on-chain or off-chain resources allowing dynamic content on ENS dWebsites.
ENSIP-07: Contenthash Field
ENSIP-10: Wildcard Resolution
EIP-3668: CCIP Read: Secure Off-Chain Data Retrieval
RFC-2397: The “data” URL Scheme
Copyright and related rights waived via