2

OK, the issue is that several guides on how to connect to websockets using Curl don't work on geth's websocket for whatever reason. Using a tool specifically for websockets allowed the requests to go through just fine. $ wscat -c wss://XXXXXXXXXX/ connected (press CTRL+C to quit) > {"jsonrpc":"2.0","method":"web3_sha3&...


1

Ganache is as server node to ethereum chain and you can using standart ethereum rpc api (attention, look port , default,7545 , but bettet to check, see here more details about configuration ganache https://www.trufflesuite.com/docs/ganache/reference/workspace-default-configuration) For calling method to only getting data from smart you should using https://...


1

Came to know that WSL-2 cannot connect to the localhost directly. See this and this. WSL-2 has its own port to listen to. Ganache gives you the option to select that port instead of localhost. Go to Settings > Server > Hostname > 172.23.160.1 - Ethernet (WSL) Can use the command provided by @Ismael above in the comments to check if the port is ...


1

this solution is working for me: web3.currentProvider.sendAsync({ jsonrpc: '2.0', method: 'evm_unlockUnknownAccount', params: [address], id: new Date().getTime() }, console.log);`


1

May be it is a bit late to answer but for others if they need in future. I had a typo in --datadir and --networkid. Hope it helps!


Only top voted, non community-wiki answers of a minimum length are eligible