The following short code snippet:
const Web3 = require(‘web3’);
const INFURA_KEY = “…”;
const web3 = new Web3(‘wss://mainnet.infura.io/ws/v3/’ + INFURA_KEY);
var shh = web3.shh;
Then I get the following error:
“Error: Returned error: The method shh_info does not exist/is not available”.
Does anyone have an idea what’s wrong here?
Hi @nico77 unfortunately we do not currently support the whisper protocol. What are you trying to do, maybe we can help suggest an alternative approach.
Hi @mike, thank you very much for your answer and the clarification. The objective is to send a message to the recipient of a payment.
Hi @mike, are you planning to itroduce whisper to Infura any time soon?
Hi @nico77 we have had a few requests for whisper support and are absolutely evaluating adding it. Does your use-case pertain to a notification for a user in your application after receiving a payment? What is the benefit of using the whisper protocol in this case?
Hi @mike, yes, using Whisper in order to notify a recipient of a payment is my intention. I may could use the new Ethereum Push Notification Service (EPNS) instead.
There might be an alternative solution @nico77. How are you developing the client application that is receiving the notification? You can also create a filter to get a notification when a specific event occurs on chain. https://infura.io/docs/ethereum/wss/eth-subscribe
Hi @egalano Thanks for your advise. Yes, that would be a good idea as well, using event filtering (on “my” address). In case, I would like to develop a messenger, there is no chance using Infura?
Are you talking about something like an instant messaging app? If you share more details about what you’re trying to implement I could try to point you in the right direction. Feel free to DM me if you prefer to keep the details private.
Yes, let’s assume developing a secure instant messaging app, which I would have developed using Whisper.
Unfortunately the SHH/whisper protocol was the only option for something like that which was included in the Ethereum APIs we support. Since whisper support has been removed from the go-ethereum client, you’ll have to decide on an alternative protocol to use for messaging based on your use case. Maybe something like Secure Scuttlebutt or the Signal protocol.
Thank you very much, @egalano for your answer. Are there any plans to (re-) activate Whisper on Infura? I am referring to https://github.com/INFURA/infura/issues/19
Not at this time. The Ethereum Foundation has ceased active development on whisper due to scaling concerns per the notes here: https://github.com/ethereum/whisper .