1

I am struggling to get a simple whisper (shh) example running. I am using the following versions: geth 1.9.24-stable-cc05b050 web3 6.14.5

I am running geth with the following command:

geth --shh --rpc

And I start coding with the following linex:

var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
var shh = web3.shh;
(async function main() {
   var keyPair = await shh.newKeyPair();
})();

Then I get the following error:

Error: Returned error: the method shh_newKeyPair does not exist/is not available

I guess that the shh command is not supported by the node (geth).

Can anyone instruct how to get a simple message passing example using Whisper running with the versions above? Thanks for the support.

1
0

v1.9.24 no longer has whisper, it has been trashed since v1.9.21. You should use a previous version. (like v1.9.17)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.