Using js-ipfs-api to edit IPNS addresses

Hopefully I’m not opening an useless thread, as the discussion already exists in a Github issue. I’m trying to draw more attention to this, being one of the most important basic functionalities yet to be implemented.

Currently it’s not possible for js-ipfs to manipulate IPNS domains. This is a complete showstopper when it comes to designing dynamic sites: For any self changing website to work, you must allow the site (JavaScript) to securely update an IPNS reference and make it point to new configuration files once they’re generated and uploaded into the network by the script. As all files on IPFS are subject to immutability, you cannot edit a configuration stored within the network without the new configuration containing a new hash, which the website has no way of knowing about without a constant reference to the latest files. For an user to update their account settings on an IPFS site today, they would have to manually use the “ipfs name” command from a console in order to point the site to the new settings… which is the equivalent of manually having to mix the engine oil of your car by using a lever while you’re driving.

From what was discussed in that issue, the problem lies with DHT and Circuit Relay: JavaScript has no easy way of issuing commands to the IPFS daemon, which sounds like a problematic limitation in a lot of aspects. I hear progress is being made however, so hopefully this won’t be the case for long.

I’m not an experienced developer myself nor familiar with the code of IPFS, as such I can’t do much to help at the moment. But I’m hoping this thread gives the issue a place to be debated, which in turn helps ideas spread and perhaps someone comes up with a good solution sooner.

I am a little confused: Upon looking up more info, it seems that js-ipfs-api already has the ability to edit an IPNS address automatically! I spoke about this yesterday in the IRC channel, and someone else confirmed that this should be working.

Is the limitation discussed in the bug above js-ipfs specific? If so, should I conclude that ipfs.name.*() commands will only work if the browser is connected to a go-ipfs instance but not if it’s connected to a js-ipfs node, until that bug has been resolved?