Connect to Ethereum network via web3
Maintains connection state, network properties
Reconnects in case of connection dropped. NB: each consumer has to resubscribe atm after reconnection (on "connected" event)
Usage:
const ethereumConnection = new EthereumConnection();
await ethereumConnection.connect().catch( e => {..} )
fires
EthereumConnection#connected
fires
EthereumConnection#disconnected NB: it's only in case of error code 1000, normal end
Connect to Ethereum network via web3 Maintains connection state, network properties Reconnects in case of connection dropped. NB: each consumer has to resubscribe atm after reconnection (on "connected" event) Usage: const ethereumConnection = new EthereumConnection(); await ethereumConnection.connect().catch( e => {..} )
EthereumConnection#connected
EthereumConnection#disconnected NB: it's only in case of error code 1000, normal end
EthereumConnection#connectionLost