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
- Host: GitHub
- URL: https://github.com/zulhfreelancer/ethname
- Owner: zulhfreelancer
- Created: 2019-06-14T15:37:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-14T15:44:06.000Z (over 6 years ago)
- Last Synced: 2025-05-20T14:09:13.806Z (8 months ago)
- Topics: ethereum, geth, go-ethereum, parity
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"
}
```