https://github.com/thelolagemann/go-ethermine
go-ethermine is an unofficial golang client for Ethermines generic pool API
https://github.com/thelolagemann/go-ethermine
ethermine ethermine-api flypool golang-library mining-pool
Last synced: 5 months ago
JSON representation
go-ethermine is an unofficial golang client for Ethermines generic pool API
- Host: GitHub
- URL: https://github.com/thelolagemann/go-ethermine
- Owner: thelolagemann
- License: mit
- Created: 2021-03-02T16:37:15.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-08T21:14:45.000Z (over 5 years ago)
- Last Synced: 2024-06-20T08:15:58.822Z (about 2 years ago)
- Topics: ethermine, ethermine-api, flypool, golang-library, mining-pool
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# go-ethermine
[](https://pkg.go.dev/github.com/thelolagemann/go-ethermine) [](https://github.com/thelolagemann/go-ethermine/blob/main/LICENSE) 
> An unoffical golang client for ethermine and their generic pool API.
## Getting started
### Install
```
go get -u github.com/thelolagemann/go-ethermine
```
### Example usage
```golang
...
// pool interaction
stats, err := Ethermine.Stats()
if err != nil {
// handle err...
}
fmt.Printf("Ethermine is mining $%.2f an hour!", (stats.PoolStats.BlocksPerHour*5)*stats.Price.USD)
// Output: Ethermine is mining $430049.51 an hour!
...
// miner interaction
miner := Ethermine.Miner("ADDRESS")
stats, err := miner.Stats()
if err != nil {
// handle err
}
fmt.Printf("Unpaid balance: %v", stats.Unpaid)
...
// worker interaction
worker := miner.Worker("MINER_NAME")
stats, err := worker.Stats()
if err !=- nil {
// handle err`
}
fmt.Printf("Worker hashrate: %v", stats.CurrentHashrate)
```
View the godocs for more detailed documentation.