An open API service indexing awesome lists of open source software.

https://github.com/zulhfreelancer/ethname

A simple Go package that can tell if you are connected to Geth or Parity node
https://github.com/zulhfreelancer/ethname

ethereum geth go-ethereum parity

Last synced: 6 months ago
JSON representation

A simple Go package that can tell if you are connected to Geth or Parity node

Awesome Lists containing this project

README

          

## Ethereum Node Name Checker (Golang)

A simple Go package that can tell if you are connected to Geth or Parity node

### Installation

```
// If you are not using Go 1.11 Modules
$ go get github.com/zulhfreelancer/ethname

// If you are using Go 1.11 Modules, run this before executing code below
$ go mod tidy
```

### Usage

```
import (
"github.com/zulhfreelancer/ethname"
)

func yourFunction() {
name := ethname.GetEthClientName("https://THE-ETHEREUM-NODE-IP-ADDRESS-AND-PORT")
fmt.Println(name) // will output "Geth" or "Parity"
}
```