https://github.com/lnsp/npapi
Lightweight Go wrapper for the Nanopool Ethereum API.
https://github.com/lnsp/npapi
ethereum go nanopool nanopool-ethereum-api wrapper
Last synced: 3 months ago
JSON representation
Lightweight Go wrapper for the Nanopool Ethereum API.
- Host: GitHub
- URL: https://github.com/lnsp/npapi
- Owner: lnsp
- License: mit
- Created: 2017-08-13T22:48:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T22:29:21.000Z (over 7 years ago)
- Last Synced: 2025-02-11T16:41:47.338Z (5 months ago)
- Topics: ethereum, go, nanopool, nanopool-ethereum-api, wrapper
- Language: Go
- Homepage: https://godoc.org/github.com/lnsp/npapi
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npapi [](https://godoc.org/github.com/lnsp/npapi)
A lightweight Go wrapper for the Nanopool Ethereum API.
## Example
```go
package mainimport (
"fmt"
"github.com/lnsp/npapi"
)func main() {
if len(os.Args) != 2 {
fmt.Fprintln(os.Stderr, "USAGE: go run main.go [nanopool account address]")
return
}
balance, err := npapi.Balance(os.Args[1])
if err != nil {
fmt.Fprintf(os.Stderr, "failed to fetch balance: %v\n", err)
return
}
fmt.Printf("You have earned %.6f ETH.\n", balance)
}
```