Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Net ¶
type Net struct {
// contains filtered or unexported fields
}
Net - The Net Module
func NewNet ¶
func NewNet(provider providers.ProviderInterface) *Net
NewNet - Net Module constructor to set the default provider
func (*Net) GetPeerCount ¶
func (net *Net) GetPeerCount() (types.ComplexIntResponse, error)
GetPeerCount - Returns number of peers currently connected to the client. Reference: https://github.com/ethereum/wiki/wiki/JSON-RPC#net_peercount Parameters:
- none
Returns:
- QUANTITY - integer of the number of connected peers.
func (*Net) GetVersion ¶
GetVersion - Returns the current network id. Reference: https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version Parameters:
- none
Returns:
- String - The current network id. "1": Ethereum Mainnet "2": Morden Testnet (deprecated) "3": Ropsten Testnet "4": Rinkeby Testnet "42": Kovan Testnet
func (*Net) IsListening ¶
IsListening - Returns true if client is actively listening for network connections. Reference: https://github.com/ethereum/wiki/wiki/JSON-RPC#net_listening Parameters:
- none
Returns:
- Boolean - true when listening, otherwise false.
Click to show internal directories.
Click to hide internal directories.