import { Provider , ZilliqaModule } from '@zilliqa-js/core' ; import { Wallet } from '@zilliqa-js/account' ; const enum NetworkMethods { GetClientVersion = 'GetClientVersion' , GetNetworkId = 'GetNetworkId' , GetProtocolVersion = 'GetProtocolVersion' } export class Network implements ZilliqaModule { provider : Provider ; signer : Wallet ; constructor ( provider , signer ) { this . provider = provider ; this . signer = signer ; } getClientVersion ( ) { return this . provider . send ( NetworkMethods . GetClientVersion ) ; } GetNetworkId ( ) { return this . provider . send ( NetworkMethods . GetNetworkId ) ; } GetProtocolVersion ( blockNum ) { return this . provider . send ( NetworkMethods . GetProtocolVersion ) ; } }