How to use with Web3.js 1.0

Hideyoshi Moriya
1 min readAug 23, 2018


  • HTTP provider is deprecated in Web3.js 1.0.
  • Websocket provider needs to be used instead of HTTP provider.
  • Infura HTTP provider URL:
  • Infura Websocket URL: wss://

In Web3.js 1.0, Web3 needs to be initialized as below.

var web3 = new Web3('wss://');


If you find this article is helpful, it would be greatly appreciated if you could tip Ether to the address below. Thank you!