I'm trying to connect to Solana mainnet using websockets. I can't find out how to connect using web3.js. Maybe someone faced this issue and can help me ?
Thanks
Here's a simple line of code I made:
let con = new web3.Connection('https://api.mainnet-beta.solana.com', { commitment: "confirmed", wsEndpoint: 'ws://api.mainnet-beta.solana.com' });