wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

I want to have better ENS resolvers

Open nerfZael opened this issue 3 years ago • 0 comments

We should have support for resolve the ENS contenthash for multiple protocols (e.g. IPFS, SWARM, OCR). Additionally, we should support text record resolution.

ENS contenthash

Contenthash resolver can read the ens contenthash as string and then redirect to wrap://ens-contenthash/0xefa2312ds32... Then protocol specific resolvers for the contenthash could pick up the resolution. E.g. IPFS-ENS-Contenthash resolver could decode the contenthash, check if it's an IPFS CID and redirect to ipfs/Qmdsads... if it is

Existing implementation

  • https://github.com/nerfZael/ens-contenthash-resolver-plugin-wrapper
  • https://github.com/nerfZael/ipfs-ens-contenthash-resolver-plugin-wrapper

ENS text record

The text record key should be in the format of wrap/*, where * is the string that the resolution process will redirect to when resolving the text record. Examples WRAP URIs:

URI: `wrap://ens/uniswap.eth/wrapper` 
    text-record key: `wrap/wrapper`
    text-record value: `ipfs/Qmdsadas`
URI: `wrap://ens/uniswap.eth/wrapper` 
    text-record key: `wrap/wrapper`
    text-record value: `ens/uniswap-new.eth`
URI: `wrap://ens/uniswap.eth/wrapper` 
    text-record key: `wrap/wrapper`
    text-record value: `ens/uniswap.eth/v3`
URI: `wrap://ens/uniswap.eth/wrapper/v1` 
    text-record key: `wrap/wrapper/v1`
    text-record value: `ens/uniswap.eth/v3`
URI: `wrap://ens/uniswap.eth/wrapper` 
    text-record key: `wrap/wrapper/v2`
    text-record value: `ens/uniswap.eth/v2`

nerfZael avatar Aug 09 '22 16:08 nerfZael