https://github.com/stratumfarm/go-miningcore-client
a go wrapper for the miningcore api
https://github.com/stratumfarm/go-miningcore-client
miningcore miningcore-api miningcore-client
Last synced: 3 months ago
JSON representation
a go wrapper for the miningcore api
- Host: GitHub
- URL: https://github.com/stratumfarm/go-miningcore-client
- Owner: stratumfarm
- License: mit
- Created: 2022-05-31T19:53:33.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T08:59:31.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T21:04:01.358Z (almost 2 years ago)
- Topics: miningcore, miningcore-api, miningcore-client
- Language: Go
- Homepage: https://pkg.go.dev/github.com/stratumfarm/go-miningcore-client
- Size: 45.9 KB
- Stars: 5
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-miningcore-api
[](https://github.com/stratumfarm/go-miningcore-client/actions/workflows/testing.yml)
[](https://github.com/stratumfarm/go-miningcore-client/actions/workflows/lint.yml)
[](https://pkg.go.dev/github.com/stratumfarm/go-miningcore-client)
[](https://goreportcard.com/report/github.com/stratumfarm/go-miningcore-client)
## About
This is a go wrapper around the miningcore api. It implements the miningcore api v2, which also returns meta object, on all available endpoints.
## Install
```
$ go get github.com/stratumfarm/go-miningcore-client
```
## Usage
```go
package main
import (
"context"
"fmt"
"github.com/stratumfarm/go-miningcore-client"
)
func main() {
c := miningcore.New(
"https://localhost:8443",
miningcore.WithTimeout(time.Second * 5),
miningcore.WithoutTLSVerfiy(),
)
pools, statusCode, err := c.GetPools(context.Background())
if err != nil {
fmt.Println(statusCode, err)
}
for _, v := range pools {
fmt.Println(v)
}
}
```