Is it possible use IPNS module with infura(without launching local node)?

I tried IPNS as like that bellow code.
It can not work when specify host to “ipfs.infura.io”.

node.add(Buffer.from("upload on 2020/03/20"), function (err, res) {
  if (err || !res) {
    return console.error('ipfs add error', err, res)
  }
  node.name.publish(res[0].hash, (err, res) => {
    console.log(err);
    console.log(res);
  });
})

As far as I read the reference, it seems impossible at the moment.(https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/NAME.md#namepublish)

Is there a possibility that can IPNS without launching local node in the future? (ex:specify peerId in option)
or It’s possible using another way?

As you can see in Infura docs, the above API is not exposed on their nodes. (I will have to confirm this, as soon as I am on my system, traveling right now)

APIs like these are usually not made public due to potential misuse.

Until someone exposes this API for public, I don’t think that you can publish IPNS Names without running a local node.

P.S. any reason why you don’t want to run local node?

As vasa pointed out, Infura is pretty limited in the terms of API calls you can make. I run a service called Temporal that offers full IPFS capabilties, whether its IPNS, PubSub, pin management, IPFS HTTP API access, etc… we support everything :slight_smile: Our WebUI also supports all capabilities that our API(s) offer, so if you dont want to deal with programming anything you can check out our webui instead (recommend trying play2 as its nicer)

Docs: https://gateway.temporal.cloud/ipns/docs.api.temporal.cloud
Old WebUI: https://play.temporal.cloud
New WebUI: https://play2.temporal.cloud
Main website: https://temporal.cloud
Telegram: https://t.me/RTradeTEMPORAL

APIs like these are usually not made public due to potential misuse.

There are certainly ways to prevent misuse, it just takes a bit of manual effort and not using an NGINX reverse proxy which is what Infura does.