ensdomains / ens-app

Legacy ENS manager app
https://legacy.ens.domains/
BSD 2-Clause "Simplified" License
224 stars 266 forks source link

Howto create ipns dnslink for ens app #1627

Open chrisschaub opened 1 year ago

chrisschaub commented 1 year ago

Since the ens app has removed support for dnslink style contentHashes like /ipns/somedomain.com , it would be great to have some documentation on the best way to create ipns hashes for dnslink. I can see in the code there are now checks to make sure ipns is crypto, not plain text.

I would like to see a working example of creating libp2p-key compatible contentHashes that can be used in the ens app. IPNS is a pain to setup and republish, but a compatible ipns hash should allow most ifps gateways to resolve the dnslink.

The most related github issue is here: https://github.com/ensdomains/ens-app/issues/849#issuecomment-660985090

In short, I want to create a correctly encoded ipns name/key that can be used to get /ipns/somedomain.com so dnslink will take over. I understand not wanting plain text in the content hash, but it seems it's still possible to do by encoding the somedomain.com part, I just can't get any of the examples to work in the app, they all create strings that throw errors.

Thank you for your consideration.

rickstaa commented 10 months ago

Hi @chrisschaub,

I agree with adding a section in the ENS-domain documentation to outline the recommended DNSLink approach. I recently followed the guidelines provided in the IPFS DNSLink documentation, available at DNSLink Concepts to serve a PNG that is stored on the IPFS network through a DNSLink entry.

This method proved effective, as you can see in the implementation on my IPFS subdomain. Including similar guidelines in our ENS-domain documentation could greatly assist others in implementing this method more efficiently.